Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140994 田祥江 偶数个1 C++ Compile Error 0 MS 0 KB 362 2025-12-20 15:57:22

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n; scanf("%d",&n); for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ scanf("%d",&a[i][j]); } } for(int i=1;i<=n;i++){ sum=0; for(int j=1;j<=n;j++){ if(a[i][j]==1)sum++; } if(sum%2!=0){ cout<<"Corrupt"<<endl; return 0; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:19: error: 'a' was not declared in this scope
       scanf("%d",&a[i][j]);
                   ^
Main.cc:12:3: error: 'sum' was not declared in this scope
   sum=0;
   ^
Main.cc:14:7: error: 'a' was not declared in this scope
    if(a[i][j]==1)sum++;
       ^
Main.cc:5:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
                   ^