String Game
Alice and Bob are playing a game. They have a common string $S$ of length $N$. The players also have their individual strings $A$ (belonging to Alice) and $B$ (belonging to Bob) which are empty in the beginning. Game begins with Alice and both players take alternate turns. In her/his turn, the player picks a single character from string $S$, adds it to the end of their individual string and delet
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