Drunk Game
CodeChefOpen on judge ↗
Alice and Bob were getting bored and decided to play a game. The game involves a pile of coins. Both players take turns in picking a certain number of coins from the pile. Initially, the pile contains N coins. Alice makes the first move. The player who is unable to pick up any coins in his/her turn loses the game. Some of the details of the game are: - In each turn a player can only decide on
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