tipstar0125 / atcoder

atcoder
6 stars 0 forks source link

Nim, Grundy数 #27

Open tipstar0125 opened 7 months ago

tipstar0125 commented 7 months ago

Nim, Grundy数を考える前に、以下で解けないか考える。

まず初手で「必勝状態」に持っていって、それ以降は相手の行動の真似をしたり打ち消したりするような操作を取り続けることで必ず勝てる

参考:

tipstar0125 commented 7 months ago

Nim

【ルール】

【判定方法】

tipstar0125 commented 7 months ago

grundy数

grundy数の求め方

tipstar0125 commented 7 months ago
tipstar0125 commented 7 months ago

XOR sumが計算制約上簡単に求められない場合:https://atcoder.jp/contests/arc168/tasks/arc168_b