Coin Game
CodeChefOpen on judge ↗
Raj and Rahul loves to play with coins.One day Raj invented a game called "Coin Game".Following are the rules of the games: 1.The game begins with n piles of coins indexed from 0 to n-1. Each pile "j" has "cj" coins where 0 ≤ j"j" more than "p" times. The player who removes the last coin wins the game. Given the values of "n", "p" and the numbers of coins in each of the "n" piles, determine whe
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