Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
8012 | 刘芃伽 | 偶数个1 | C++ | Compile Error | 0 MS | 0 KB | 623 | 2025-06-07 09:04:39 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,cnt=0; cin>>n; int a[n][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++){ cnt=0; for(int j=0;j<=n;j++) cnt+a[i][j]; if(cnt%2==1){ cout<<"Corrupt"; return 0; } } for(int j=0;j<=n;j++){ cnt=0; for(int i=0;i<=n;i++) cnt+a[i][j]; if(cnt%2==1){ cout<<"Corrupt"; return 0; } } return 0; }
Main.cc: In function 'int main()': Main.cc:6:18: error: variable-sized object 'a' may not be initialized int a[n][n]={}; ^ Main.cc:15:16: warning: statement has no effect [-Wunused-value] cnt+a[i][j]; ^ Main.cc:24:16: warning: statement has no effect [-Wunused-value] cnt+a[i][j]; ^