-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
141 lines (126 loc) · 5.4 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
public class Main {
public static void main(String[] args) {
int[][] sudoku = new int[][]{
{1, 0, 2, 0, 8, 0, 0, 6, 0},
{4, 6, 0, 0, 7, 2, 9, 1, 3},
{5, 0, 0, 6, 1, 0, 0, 0, 2},
{2, 0, 3, 0, 5, 0, 4, 0, 7},
{8, 0, 6, 0, 9, 7, 0, 5, 1},
{0, 5, 0, 2, 4, 0, 3, 0, 6},
{6, 0, 4, 7, 0, 5, 0, 0, 9},
{3, 9, 0, 4, 0, 0, 7, 0, 0},
{0, 2, 5, 1, 3, 0, 6, 4, 0}};
int[][] sudokuMegaHard = new int[][]{
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 3, 6, 0, 0, 0},
{0, 0, 0, 8, 0, 0, 0, 1, 2},
{0, 0, 1, 6, 0, 0, 9, 7, 8},
{0, 0, 0, 0, 7, 0, 0, 0, 0},
{0, 0, 5, 0, 0, 0, 0, 2, 4},
{0, 0, 0, 0, 0, 7, 0, 4, 0},
{0, 6, 9, 0, 5, 0, 1, 0, 0},
{3, 0, 0, 0, 0, 0, 0, 0, 0}};
int[][] sudokuSuperHard = new int[][]{
{7, 0, 0, 0, 0, 1, 0, 0, 0},
{0, 6, 0, 0, 9, 0, 0, 0, 5},
{0, 0, 8, 0, 0, 5, 0, 9, 7},
{0, 0, 0, 1, 0, 0, 0, 0, 3},
{5, 8, 2, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 4, 0, 0, 2, 0, 0},
{0, 0, 0, 7, 1, 0, 0, 2, 0},
{0, 0, 0, 2, 0, 0, 3, 0, 0},
{6, 0, 9, 0, 0, 0, 4, 0, 0}};
int[][] invalidSudoku = new int[][]{
{8, 7, 0, 0, 0, 1, 4, 0, 0},
{3, 0, 0, 2, 0, 4, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 9},
{0, 0, 1, 0, 0, 6, 2, 9, 4},
{9, 0, 0, 3, 2, 7, 0, 0, 8},
{2, 8, 0, 4, 0, 0, 6, 0, 0},
{5, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 9, 0, 0, 3},
{0, 0, 4, 5, 0, 0, 0, 2, 7}};
int[][] ololo = new int[][]{
{0, 0, 0, 0, 6, 0, 7, 0, 0},
{0, 5, 9, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 2, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0},
{6, 0, 0, 5, 0, 0, 0, 0, 0},
{3, 0, 0, 0, 0, 0, 4, 6, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 9, 1},
{8, 0, 0, 7, 4, 0, 0, 0, 0}
};
int[][] impossibleSudoku = new int[][]{
{1, 2, 3, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 0, 0, 0},
{0, 0, 0, 3, 0, 0, 0, 1, 2},
{0, 1, 2, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 2, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 2, 0, 1},
{2, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 2, 0},
{0, 0, 0, 2, 0, 0, 1, 0, 0}};
int[][] checkSudoku = new int[][]{
{0, 8, 0, 6, 0, 0, 0, 2, 0},
{0, 0, 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