| ||||||||||
| 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 | |||||||||
高手帮忙看看,哪错了??#include<iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
int b[100];
int main()
{
int N,D,i,j,re,count;
while(cin>>N>>D)
{
if(N==D&&D==0) break;
memset(b,0,N*4);
count=N;
for(i=0;i<D;i++)
{
for(j=0;j<N;j++)
{
cin>>re;
if(re==1)
b[j]++;
if(b[j]<(i+1)){
count--;
b[j]=D;
}
}
if(count==0) break;
}
if(count==0)
cout<<"no"<<endl;
else
cout<<"yes"<<endl;
}
system("pause");
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator