Interesting Game
CodeChefOpen on judge ↗
Zen and Zenny decided to play a game.Game consist of $P$ apples in a container $B$ and they have also an array $A$ with $N$ elements.Game is played as follows , each player take turn to pick an element from the array and removes that number of apples from the container $B$, the player who is unable to remove the apples from the container looses the game. Zen start the game and if both players play
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