Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
125714 陈华仁星 偶数个1 C++ Wrong Answer 1 MS 284 KB 678 2025-07-15 14:13:25

Tests(1/10):


Code:

#include <iostream> #include <algorithm> using namespace std; int a[100][100]; int main() { int n,cnt=0,k,s; scanf("%d",&n); for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { if(a[i][j]==1) { cnt++; } if(cnt%2==0) k=0; else k=1; } } for(int j=0;j<n;j++) { for(int i=0;i<n;i++) { if(a[j][i]==1) { cnt++; } if(cnt%2==0) s=0; else s=1; } } if(k==0&s==0) printf("OK"); else printf("Corrupt"); return 0; }


Run Info:

------Input------
10 0 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1
------Answer-----
Corrupt
------Your output-----
OK