Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2908 吴奕希 偶数个1 C++ Accepted 1 MS 296 KB 516 2024-03-09 17:21:19

Tests(10/10):


Code:

# 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; }