Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
ze怎么 WA 11111!!!!4 1 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 #include<stdio.h> int main() { int n,i,j,a[100][100],sum1,sum2,flag1,flag2; while(1) { scanf("%d\n",&n); if(n==0) break; sum1=0;sum2=0;flag1=0;flag2=0; for(i=0;i<n;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); for(i=0;i<n;i++) { for(j=0;j<n;j++) { sum2+=a[j][i]; sum1+=a[i][j]; } if(sum1%2==1)flag1=i+1; if(sum2%2==1)flag2=i+1; sum1=0;sum2=0; } if(a[flag1-1][flag2-1]==1)printf("Change bit (%d,%d)\n",flag1,flag2); else if(flag1==0&&flag2==0)printf("OK\n"); else printf("Corrupt\n"); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator