Ahhh, Networks!
CodeChefOpen on judge ↗
A network of computers is given, each computer has a button and a counter. If a button of a computer is pressed, the counter at that computer increases by one, and also the computers which are connected one way to this computer will increase their counters by one as well. You are given array of the counters found on the computers after pressing some buttons. Find whether it is possible to get the
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start