Minions in a Tree
CodeChefOpen on judge ↗
QUESTION: We are in Gru's lab, where the minions are busy moving things in coveyor belts in the facility. But the power has cut off, and all the minions started to play on the coveyor belts. The facility can be represented as tree which has $N$ junctions numbered 1 to $N$ and $N - 1$ bidirectional conveyor belts connecting the junctions. All the junctions are connected either directly or indirectl
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