← All problemsSign in

The Big Fight

Amit, Debasish and Kamal have arrived to GeorgePool and want to visit all of the tourist spot. The city has $N$ tourist spot and $N-1$ roads connecting them. Now, Amit and Debasish both are weak in mathematics especially calculating distances (Yes, it seems stupid but they really are weak in calculating distances), and they have started fighting over from where to start there visit. Both of them

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