| ||||||||||
| 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#include<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;
int main()
{
int n,d;
while(scanf("%d%d",&n,&d)&&n&&d)
{
int i,j,p;
int dinner[502][102];
for(j=0;j<d;j++)
{
for(i=0;i<n;i++)
scanf("%d",&dinner[j][i]);
}
for(i=0;i<n;i++)
{
for(j=0;j<d;j++)
{
if(dinner[i][j]==0)
{
p=0;
break;
}
else p=1;
}
}
if(p==1)
printf("yes\n");
else printf("no\n");
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator