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 |
怎么回事啊,怎么老是WA啊,难道我题目理解错了。大家帮我看看啊怎么回事啊,怎么老是WA啊,难道我题目理解错了。大家帮我看看啊 #include <cstdio> int main() { int n,m,i,j,sum=0,s=0; while(1) { scanf("%d%d",&n,&m); if(n==0&&m==0) break; int a[m+5][n+5]; for(i=0;i<m;i++) { for(j=0;j<n;j++) scanf("%d",&a[j][i]); } for(i=0;i<n;i++) { for(j=0;j<m;j++) { if(a[j][i]==1) sum=sum+1; } if(sum==m) s=s+1; } if(s==n) printf("yes\n"); else printf("no\n"); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator