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

why is WA

Posted by tcxgsy at 2005-10-02 10:55:57 on Problem 2620
#include"stdio.h"

void main()
{ long int m,a,b,max,min;
  long int k;
 while(scanf("%d",&m)!=EOF)
  {  max=50001;min=-50001;k=0;
      while(scanf("%ld%ld",&a,&b)&&(a||b))
        {    if(a<=0&&b>=m){ k++;
                            if(min<=a&&max>=b)
                                   {max=b;min=a;}
                            }
         }
      if(k==0)  printf("No solution\n");
       else { printf("%ld\n",k);
              printf("%ld %ld\n",min,max);}
   }
}


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