← All problemsSign in

Incremental Game

CodeChefRating 1227Open on judge ↗

Alice and Bob found two piles of stones: one with $X$ stones, and the other with $Y$ stones. They decide to play a game using these piles. Alice and Bob are always trying to one-up each other, so they decide to play under the following rules: - The players take turns moving, with Alice going first. - On Alice's first move, she must choose one of the piles, and remove **at least** $1$ and **at

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