1 solutions
-
1
#include<bits/stdc++.h> using namespace std; const int R=101; int n[R][R]; int main(){ int s,accept1=0,h=0,l=0,c1=0,c2=0; cin>>s; for(int i=1;i<=s;i++) { for(int q=1;q<=s;q++) { cin>>n[i][q]; } } for(int i=1;i<=s;i++) { int jishu=0; int jishu2=0; for(int q=1;q<=s;q++) { if(n[i][q]1) { jishu++; } if(n[q][i]1) { jishu2++; } } if(jishu%2!=0) { h=i; c1++; } if(jishu2%2!=0) { l=i; c2++; } } if(c10&&c20) { cout<<"OK"; } else if(c11&&c21) { cout<<h<<" "<<l; } else { cout<<"Corrupt"; } return 0; }
- 1
Information
- ID
- 528
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 3
- Tags
- (None)
- # Submissions
- 15
- Accepted
- 5
- Uploaded By