← All problemsSign in

A game on a graph

CodeChefRating 3039Open on judge ↗

Two players, Askar and Bob, play a game with a token on an undirected graph G. The game goes as follows: - Askar chooses a starting vertex and places the token on this vertex. - The players now alternate turns; Bob moves first. - In his turn, each player has to move the token along exactly one edge to another vertex. - It's not allowed to move the token to some vertex if it was on that vertex

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