LADDY AND THE GENIE
CodeChefOpen on judge ↗
Laddy found a magic lamp one day and as his wish, he asked for a lot of money. What he didn't know was that the genie in the lamp was as mischievous and clever as he was powerful. The genie told him that he could get a lot of money if he played a game. The genie would put in front of him, bills of certain denominations lined up. These bills had a unique property. Contiguous bills could be grouped
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