Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

高手帮忙看看,哪错了??

Posted by ahxun2006 at 2008-04-26 00:52:08 on Problem 2864
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator