Official
C - Candies Candidates Editorial by hos_lyric
より詳しい解説:https://hos-lyric.hatenablog.com/entry/2021/01/14/201120
\(n\) 個のキャンディが置かれている皿の Grundy 数を次のように求めることができます.
\(n\) を相異なる連続しない Fibonacci 数の和に表すとき,使用する最小の Fibonacci 数が
- \(2, 5, 13, 34, \ldots\) のいずれかのとき,Grundy 数は \(0\)
- \(1\) のとき,Grundy 数は \(1\)
- \(3, 8, 21, 55, \ldots\) のいずれかのとき,Grundy 数は \(2\)
posted:
last update: