← All problemsSign in

Spiderman saves the city

Your friendly neighborhood Spiderman is back with a mission. He has been given a task to collect anti-venom drugs. The anti-venom drugs are present in some of the buildings. Each building that has anti-venom drugs has an enemy building next to it where fake venom drugs are kept. Spiderman's task is to collect only the real one's starting from 1st building itself. There are $M$ buildings in $N$ row

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start