Rosetta Problems

Tree Game

https://atcoder.jp/contests/agc010/tasks/agc010_f