Rosetta Problems

高橋君と木のおもちゃ

https://atcoder.jp/contests/arc029/tasks/arc029_4