https://www.acwing.com/solution/content/23435/
https://oiwiki.org/math/game-theory/impartial-game/
https://ac.nowcoder.com/acm/contest/26656/1048
https://ac.nowcoder.com/acm/problem/blogs/18388