← All problemsSign in

Binary String Game

CodeChefRating 4015Open on judge ↗

There is a binary string $S$. Alice and Bob are playing a game on it. Each turn, the following happens: 1. Alice selects a $01$ subsequence in $S$ and removes it from $S$. (a $01$ subsequence is a length $2$ subsequence whose first character is $0$ and second character is $1$) 2. Bob selects a $01$ subsequence in $S$ and removes it from $S$. 3. After both players have moved, the turn is called c

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