USACO 2018 US Open Contest, Bronze Problem 3. Family Tree

USACO 2018 US Open Contest, Bronze Problem 3. Family Tree

2018年3月USACO美国计算机奥赛公开赛铜级题3

To be updated after competition