Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2956 | 杨洋杰 | 偶数个1 | C++ | Accepted | 1 MS | 316 KB | 472 | 2024-03-10 16:17:29 |
#include<iostream> using namespace std; int n,a[101][101],b,c; int main(){ cin>>n; 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++){ if(b%2==0) c++; b=0; for(int j=0;j<n;j++){ if(a[i][j]==1) b++; } } if(c==n) cout<<"OK"<<endl; else cout<<"Corrupt"<<endl; return 0; }