Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125711 | 晏莞煜 | 偶数个1 | C++ | Compile Error | 0 MS | 0 KB | 536 | 2025-07-15 14:11:07 |
#include<iostream> #include<cstring> using namespace std; int main(){ int n; cin>>n; int a[n][n]; for(int i=0;i<n;i++){ for(int q=0;q<n;q++){ cin>>a[i][q]; } } for(int i=0;i<n;i++){ for(int q=0;q<n;q++){ int w=0; if(a[i][q]==1){ w++; } } if(w%2!=0){ cout<<"Corrupt"; return 0; } } for(int q=0;q<n;q++){ for(int i=0;i<n;i++){ int w=0; if(a[i][q]==1){ w++; } } if(w%2!=0){ cout<<"Corrupt"; return 0; } } cout<<"OK"; return 0; }
Main.cc: In function 'int main()': Main.cc:20:6: error: 'w' was not declared in this scope if(w%2!=0){ ^ Main.cc:32:6: error: 'w' was not declared in this scope if(w%2!=0){ ^