Help in Tree problem.
https://www.codechef.com/problems/TREES
How to solve this one?detailed approach please.
AtCoder Beginner G problems upsolving