← All problemsSign in

Santa in a Hurry

Santa has already distributed gifts to children in all other countries. Only the last two are left - country A and country B. As he proceeds to fly towards these neighboring countries in his magical sleigh, he finds out that Rudolph, his reindeer, in search for a snack, has mixed the last N gifts that Santa had so precisely distributed into two different sacks, one for the children in country A an

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start