Avi and an A-mazeing Problem!
CodeChefOpen on judge ↗
Avi is trapped in a maze. While walking, he is able to find some lost keys(all different). Assume that he picks up all and there are n keys with him. After a long and weary "journey", he is able to reach the exit. But, alas! The exit door has m locks on it and will open if and only if all locks are opened. But to open it, he has to give exactly m keys to a toy elf, who will, in turn try out all p
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