Win As Second

아직 제출이 없습니다시간 제한60초메모리 제한1024 MB

문제

Ueli and Vreni are playing a game. The game's board is a tree with N\mathbf{N} vertices, all initially colored blue. They alternate turns, with Ueli going first. In each turn, a player must choose a blue vertex, together with any subset (possibly none or all) of its blue neighbors, and color all those vertices red. If at the start of a players' turn, all vertices are red, then that player loses the game and the other player wins the game.

In the example game below, Ueli colored vertex 33 red in their first turn. Then, Vreni chose vertex 22 for their turn and colored both it and its neighbor (vertex 11) red. Because all vertices are now red, Ueli loses and Vreni wins.

Ueli and Vreni have noticed that it is much easier for Ueli to win this game because he has the first turn. Therefore they have adopted the following procedure: first, Ueli chooses an integer N\mathbf{N}. Then, Vreni chooses any tree with N\mathbf{N} vertices. And then they start playing as described above, with Ueli taking the first turn.

Vreni is hopeful that being able to choose the tree can help her overcome the disadvantage of going second. Can you demonstrate how Vreni can win games in this setup?

제한

  • 1M501 \le \mathbf{M} \le 50.