Before Kurukshetra
CodeChefOpen on judge ↗
Krishna and Arjuna are to play an unusual game before the battle of Kurukshetra because they wanted to get a bit relaxed before the war. This game is played this way: both players chose a non-negative number and they alternate turns until there are no more possible moves. The player who can't make a move is considered the loser, and the other one the winner. A turn consists of chosing one or two n
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