The Change Problem
CodeChefOpen on judge ↗
Munna Bhaiya is selling guns to the people of Mirzapur. Each gun costs $Rs. 50$ There are $N$ people waiting in a queue to buy a gun from Munna and each of them either pays a $Rs. 50$ note, $Rs. 100$ note or a $Rs. 200$ note to him. Munna needs to give them back the balance amount if they pay with either Rs. 100 or Rs. 200 note. Initially Munna does not have any money. Given the sequence of the 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