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 |
Re:高手帮忙看看,哪错了??In Reply To:高手帮忙看看,哪错了?? Posted by:ahxun2006 at 2008-04-26 00:52:08 > #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