Gift Boxes
CodeChefOpen on judge ↗
Sayan's girlfriend wants to give presents on his birthday. As a coder he loves puzzles so she hid the present in boxes. There are N boxes (assume they are infinitely large and are of 'type 1') on a table, she chooses an unknown no of boxes (not given) of 'type 1' and then places K smaller boxes ('type 2') into each of them. Again she chooses an unknown no of boxes of 'type 2' and places K smaller
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