//一直在打代码就没写注释,后续有空再补充
#include<stdio.h> #define N 100 int num[N][N]; int main(void) { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) { scanf("%d", &num[i][j]); } int end = 0, rcnt1 = 0, ccnt1 = 0, r = 0, c = 0, x, y, flagx, flagy; int i, j; for (i = 1; i <= n; i++) { rcnt1 = 0, ccnt1 = 0, flagx = flagy = 0; for (j = 1; j <= n; j++) { if (num[i][j] == 1) { flagx = 1; rcnt1++; } else flagx = 0; if (num[j][i] == 1) { flagy = 1; ccnt1++; } else flagy = 0; } if (rcnt1 % 2 == 1) { r++; x = i; end = 1; } if (ccnt1 % 2 == 1) { y = i; c++; end = 1; } } if (!end) printf("OK"); else if (r == 1 && c == 1) { printf("%d %d", x, y); } else printf("Corrupt"); return 0; }
0.0分
0 人评分