sodu

回溯法数独求解

匿名 (未验证) 提交于 2019-12-02 21:45:52
public class SoduTest { private int[][] sodu = { // 最难的 // {0,0,5,3,0,0,0,0,0}, // {8,0,0,0,0,0,0,2,0}, // {0,7,0,0,1,0,5,0,0}, // {4,0,0,0,0,5,3,0,0}, // {0,1,0,0,7,0,0,0,6}, // {0,0,3,2,0,0,0,8,0}, // {0,6,0,5,0,0,0,0,9}, // {0,0,4,0,0,0,0,3,0}, // {0,0,0,0,0,9,7,0,0} // 包含两个解的 {7,6,1,2,4,5,8,3,9}, {3,2,8,1,7,9,4,5,6}, {0,0,4,8,3,6,7,2,1}, {8,7,5,9,6,4,2,1,3}, {2,3,9,7,5,1,6,4,8}, {1,4,6,2,8,3,9,7,5}, {4,1,7,3,9,8,5,6,2}, {0,0,3,4,2,6,1,8,7}, {6,8,2,5,1,7,3,9,4} }; public static void main(String[] args) { long timeStart = System.currentTimeMillis(); new SoduTest().getSoduAnswer(0, 0); long