Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95118 石晋骁 偶数个1 C++ Compile Error 0 MS 0 KB 617 2024-10-26 19:49:51

Tests(0/0):


Code:

#intlude<bits/stdc++.h> using namespace std; char a[101][101]; int main(){ int n; cin >> n; for(int i = 0;i < n;i++){ for(int j = 0;j < n;j++){ cin >> a[i][j]; } } int sum =0; for(int i = 0;i < n;i++){ for(int j = 0;j < n;j++){ if(a[i][j] == '1'){ sum++; } } if(sum%2 != 0){ cout << "Corrupt"; return 0; }else{ sum == 0; } } for(int i = 0;i < n;i++){ for(int j = 0;j < n;j++){ if(a[j][i] == '1'){ sum++; } } if(sum%2 != 0){ cout << "Corrupt"; return 0; }else{ sum == 0; } } cout << "OK"; return 0; }


Run Info:

Main.cc:1:2: error: invalid preprocessing directive #intlude
 #intlude
  ^
Main.cc: In function 'int main()':
Main.cc:6:2: error: 'cin' was not declared in this scope
  cin >> n;
  ^
Main.cc:20:4: error: 'cout' was not declared in this scope
    cout << "Corrupt";
    ^
Main.cc:23:8: warning: statement has no effect [-Wunused-value]
    sum == 0;
        ^
Main.cc:33:4: error: 'cout' was not declared in this scope
    cout << "Corrupt";
    ^
Main.cc:36:8: warning: statement has no effect [-Wunused-value]
    sum == 0;
        ^
Main.cc:39:2: error: 'cout' was not declared in this scope
  cout << "OK";
  ^