2005. Subtree Removal Game with Fibonacci Tree
MathDynamic ProgrammingTreeBinary TreeGame TheorySprague–Grundy Theorem
Hints
Hint 1
How can game theory help us solve this problem?
Hint 2
Think about the Sprague–Grundy theorem and the Colon Principle
Hint 3
The Grundy value of a node is the nim sum of the Grundy values of its children.
Preparing judge…