← All problemsSign in

Steppu

Alice and Bob are playing a game on a tree. Initially, nodes $A$ and $B$ are painted blue and red respectively, and no other node is painted. The two players take turns, with Alice going first. The game proceeds as follows: - If it is Alice's turn, she will select a node $u$ adjacent to a blue node and paint it blue. - If it is Bob's turn, he will select a node $u$ adjacent to a red

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