← All problemsSign in

Space Arrays

CodeChefRating 1511Open on judge ↗

Finally, progress reached the Madoka family and she decided to play with her little sister in the sensational game Space Arrays. The rules of the game are as follows: - Initially, a sequence $a_1, a_2, \ldots, a_N$ is given. - The players alternate turns. - In each turn, the current player must choose an index $i$ and increment $a_i$, i.e. change $a_i$ to $a_i + 1$. - Afterwards, if there is no p

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