| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 85520 | 彭士宝 | 偶数个1 | Python3 | Accepted | 48 MS | 3872 KB | 510 | 2024-07-17 19:51:58 |
def check_matrix(rows): n = len(rows) row_count = [0] * n col_count = [0] * n for i in range(n): for j in range(n): if rows[i][j] == 1: row_count[i] += 1 col_count[j] += 1 for count in row_count + col_count: if count % 2 != 0: return "Corrupt" return "OK" n = int(input()) matrix = [] for _ in range(n): row = list(map(int, input().split())) matrix.append(row) print(check_matrix(matrix))