Black&White Ring Game
Alice and Bob are playing a game. Alice goes first. They have a binary circular array $A$ with $N$ elements. In one move, a player can: - Choose a *circular continuous segment* of the array and perform a *left cyclic shift* on the chosen segment. We define the term $diff(A)$ as the number of pairs of **adjacent** elements with **different** values. Note that we also consider $A_N$ and $A_1$ as a
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