Spy the neighborhood
CodeChefOpen on judge ↗
Sherlock is investigating a new case and has to spy a residential community with $M$ properties. The residential community is established at the edge of the city between $N$ + 1 lanes indexed 0 to $N$ beginning from the edge of the city and the lanes running perpendicular to the edge. To make it easier for him to spy, if properties from multiples lanes are to be spied upon, then those lanes must b
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