https://atcoder.jp/contests/agc017/tasks/agc017_d
There is a tree with \(N\) vertices numbered \(1, 2, ..., N\). The edges of the tree are denoted by \((x_i, y_i)\).
On this tree, Alice and Bob play a game against each other. Starting from Alice, they alternately perform the following operation:
A player loses the game when he/she is unable to perform the operation. Determine the winner of the game assuming that both players play optimally.
经典SG函数题。
https://atcoder.jp/contests/agc017/submissions/21268298
SG函数练习题:AGC017D - Game on Tree
原文:https://www.cnblogs.com/topsecret/p/14584287.html