Tweedle Graph
CodeChefOpen on judge ↗
Tweedledee and Tweedledum are in a fierce battle playing a complicated graph game. The game is played on an undirected bidirectional simple graph of $N$ vertices (enumerated $1$ trhough $N$) and $(N \cdot (N-1))/2$ edges. We'll denote the beauty of vertex $u$ by $B_u$. The game goes as follows: - First Twedledee places a token in one of the vertices of the graph. - Then players alternate
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