Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6654 柯宇希 偶数个1 C++ Wrong Answer 0 MS 272 KB 760 2025-03-08 16:11:24

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,c,a[101][101]; bool f=true; cin>>n; for(int i=0;i<n;i++){ c=0; for(int j=0;j<n;j++){ cin>>a[i][j]; if(a[i][j]==1) c++; } if(c%2==1) f=false; break; } for(int j=0;j<n;j++){ c=0; for(int i=0;i<n;i++){ cin>>a[i][j]; if(a[i][j]==1) c++; } if(c%2==1) f=false; break; } if(f=true) cout<<"OK"; else cout<<"Corrupt"; return 0; }


Run Info:

------Input------
10 0 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1
------Answer-----
Corrupt
------Your output-----
OK