Magic Gifts
CodeChefOpen on judge ↗
On Sheldon's birthday bash, he received n number of Magic Gifts in a hotel. Being crazy and very particular about the things, he doesn't want to open them unless they are transferred to his home. Since the Magic Gifts can be very large in number, it is impossible to transfer them to his place manually one by one. Therefore, he seeks your help to perform a Magic-T one or more times to transfer them
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