USACO 2022 US Open Contest, Gold Problem 3. Balancing a Tree
USACO 2022 US Open Contest, Gold Problem 3. Balancing a Tree Farmer John has conducted an extensive study of the evolution of different cow breeds. The result is a rooted tree with NN (2≤N≤1052≤N≤1...