herumi / minlex

Show the minlex canonical order form of the given Sudoku grid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ナンプレの正規化ステップ・バイ・ステップ

概要

ナンプレを81桁の数字だと思って、行の入れ替えや転置などで作ることができる等価な問題から、もっとも辞書順で小さいものを探します。

ナイーブな実装。

一番上の行に着目した枝刈りRuby版。

一番上の行に着目した枝刈りC++版。

列の入れ替え時の枝刈りC++版。

ビット演算その他の最適化。

About

Show the minlex canonical order form of the given Sudoku grid.

License:MIT License


Languages

Language:C++ 83.9%Language:Ruby 15.2%Language:Makefile 0.9%