GAME OF STONES
CodeChefOpen on judge ↗
Humpty and Dumpty like to play a game what they call the ‘Game of Stones’. The rules of this game are quite simple: - The game starts with n piles of stones indexed from 1 to n. The i-th pile contains si stones. - The players make their moves alternatively. A move is considered as removal of some number of stones from a pile. - Removal of 0 stones does not count as a move. - The player who is u
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