← All problemsSign in

Potter and his Magic Wand

Potter has got multiple boxes. Each box has a torch which is either on or off. Similarly each box can have a magic wand, which if used can turn the torch on. For example: Box1 Box2 Box3 1 1 0 (Torches) 0 1 1 (Magic Wands) In the first and second box there is no need for a magic wand, the torc

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