Skip to content

Commit bd31c27

Browse files
Chi ZhangChi Zhang
Chi Zhang
authored and
Chi Zhang
committed
Sudoku Solver bug fix
1 parent 78a9ed9 commit bd31c27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/chapDFS.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ \subsubsection{代码}
923923
return false;
924924
for (i = 3 * (x / 3); i < 3 * (x / 3 + 1); i++)
925925
for (j = 3 * (y / 3); j < 3 * (y / 3 + 1); j++)
926-
if (i != x && j != y && board[i][j] == board[x][y])
926+
if ((i != x || j != y) && board[i][j] == board[x][y])
927927
return false;
928928
return true;
929929
}

0 commit comments

Comments
 (0)