Help required in a Tree Problem
Can someone provide some insight on how to approach this problem ?
Codeforces Round 950 Solution Discussion