Winter is Here
CodeChefOpen on judge ↗
The winter is here and Jon Snow is preparing for a war against the White Walkers. Jon's army has soldiers of powers *1 to N*, Jon's army makes a formation in which the soldiers stand in the increasing order of their power. Initially Jon's army is empty and the power of his army is the sum of powers of all the soldiers currently in his army. To defeat an army of power K Jon will form an army wi
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