Ryski and his Girlfriend
CodeChefOpen on judge ↗
Since Ryski has become a RedCoder, his girlfriend got little jealous, and challenged him in a game. Initially, there are 2 piles of coins containing n,m coins respectively. A player makes a move by removing one of the piles of coin and divide the other pile into 2 piles with non-zero number of coins. The game continues in similar manner. The player unable to make a move loses the game. Being a
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