← All problemsSign in

Bored of Nim

CodeChefRating 2915Open on judge ↗

Rahul and Rashi are bored of playing the game of Nim all day. More so, Rahul has been losing all the games. Actually, the array of stone piles for a game is always selected by Rashi from a huge N-length array A. This selected array is always a subarray of A. Rahul, now frustrated by his losing streak, insists that he would play the next game only if she chooses a game array of length m. Can you

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