Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2995 | 邓小龙 | 偶数个1 | C++ | Accepted | 1 MS | 300 KB | 516 | 2024-03-16 12:48:00 |
# include<iostream> using namespace std; int main(){ int n, juzhen[101][101]={0}, count=0, res=1; cin>>n; for(int i = 0; i < n; i++){ count=0; for(int j = 0; j < n; j++){ cin>>juzhen[i][j]; if(juzhen[i][j]==1)count++; } if(count%2==1)res=0; } if(res==1){ for(int j = 0; j < n; j++){ count = 0; for(int i = 0; i < n; i++)if(juzhen[i][j]==1)count++; if(count%2==1){ res = 0; break; } } } if(res==1)cout<<"OK"; else cout<<"Corrupt"; return 0; }