for (int i = 0; i < 3; i++){
for (int j = 0; j <3; j++){
int k = 0;
int[] list = new int[9];
for (int row = i*3; row < i * 3 + 3; row ++)
for(int column = j * 3; column < j * 3 + 3; column++)
list[k++] = grid[row][column];
if (!is1To9(list))
return false;
}
}
return true;
慕的地8582982
相关分类