← All problemsSign in

Game of Stones

MJ and Abhinav are playing a game . The rules of the game are as follows: • There are n piles of stones where ith pile has Ai stones. • Each player can remove 1,2 or 4 stones from any pile in his chance. • The players makes the moves alternately and Abhinav makes the first move. • The player unable to make a move will lose. Abhinav is very aggressive and he throws things here and there when l

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start