Help in Tree problem.
https://www.codechef.com/problems/TREES
How to solve this one?detailed approach please.
CF Edu Round 166 Solution Discussion
Codeforces Round 949 Solution Discussion