比DFS快了4倍只用10MS就能得出结果。。 1 #include <cstdio> 2 #include <cstring> 3 #include <ctime> 4 const int XSIZE = 3; 5 const int SIZE = XSIZE * XSIZE; 6 const int MAX_C = SIZE * SIZE * 4; //最大列 7 const int MAX_R = SIZE * SIZE * SIZE; //最大行 8 const int MAX_SUDOKU = S... Read More
50Ms左右 1 #include <cstdio> 2 #include <cstring> 3 #include <ctime> 4 #include <windows.h> 5 const int XSIZE = 4; //16*16的数独 6 const int _SIZE = XSIZE * XSIZE; 7 const int MAX_SUDOKU = _SIZE * _SIZE; //数独矩阵大小 8 const int MAX_C = _SIZE * _S... Read More