Run ID:134964

提交时间:2025-11-01 20:52:57

#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[100][100]; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { cin >> a[i][j]; } } for (int i = 0; i < n; ++i) { int r = 0; for (int j = 0; j < n; ++j) { r += a[i][j]; } if (r % 2 != 0) { cout << "Corrupt" << endl; return 0; } } for (int j = 0; j < n; ++j) { int c = 0; for (int i = 0; i < n; ++i) { c += a[i][j]; } if (c % 2 != 0) { cout << "Corrupt" << endl; return 0; } } cout << "OK" << endl; return 0; }