diff --git a/C++/chapDFS.tex b/C++/chapDFS.tex index 09b23d7d..b747a1e3 100644 --- a/C++/chapDFS.tex +++ b/C++/chapDFS.tex @@ -923,7 +923,7 @@ \subsubsection{代码} return false; for (i = 3 * (x / 3); i < 3 * (x / 3 + 1); i++) for (j = 3 * (y / 3); j < 3 * (y / 3 + 1); j++) - if (i != x && j != y && board[i][j] == board[x][y]) + if ((i != x || j != y) && board[i][j] == board[x][y]) return false; return true; }