//简单题,纯粹模拟就能通过 #include<iostream> using namespace std; bool check(int n,bool arr[100][100]) { int sum; for(int i = 0;i < n;++i) { sum = 0; for(int j = 0;j < n;++j) { sum += arr[i][j]; } if(sum % 2 != 0) return false; } for(int i = 0;i < n;++i) { sum = 0; for(int j = 0;j < n;++j) { sum += arr[j][i]; } if(sum % 2 != 0) return false; } return true; } int main() { bool matrix[100][100],end; int n; while(cin >> n) { if(n == 0)break; for(int i = 0;i < n;++i) for(int j = 0;j < n;++j) cin >> matrix[i][j]; if(check(n,matrix)) cout << "OK/n"; else { end = false; for(int i = 0;i < n;++i) for(int j = 0;j < n;++j) { if(!matrix[i][j]) matrix[i][j] = 1; else matrix[i][j] = 0; if(check(n,matrix) && !end) { cout << "Change bit (" << i+1 << ","<< j+1 <<")/n"; end = true; break; } //记得改回来 if(!matrix[i][j]) matrix[i][j] = 1; else matrix[i][j] = 0; } if(!end) cout << "Corrupt/n"; } } return 0; }