ナンプレの正規化ステップ・バイ・ステップ 概要 ナンプレを81桁の数字だと思って、行の入れ替えや転置などで作ることができる等価な問題から、もっとも辞書順で小さいものを探します。 Step 1 ナイーブな実装。 Step 2 一番上の行に着目した枝刈りRuby版。 Step 3 一番上の行に着目した枝刈りC++版。 Step 4 列の入れ替え時の枝刈りC++版。 Step 5 ビット演算その他の最適化。