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

wa了N次了...为什么呢.....

Posted by handsome8848 at 2008-10-24 19:41:11 on Problem 2586
#include <cstdio>

int max;

int main()
{
    int s,d;
    
    
    while(scanf("%d%d",&s,&d)!=-1)
    {                             max=-1;
                                  d=-d;
                                  if (4*s+d<0) max=10*s+2*d;
                                  else if(3*s+2*d<0) max=4*d+8*s;
                                  else if(2*s+3*d<0) max=6*(d+s);
                                  else if(s+4*d<0) max=8*d+4*s;
                                  
                                  if (max<0) printf("Dificit\n");
                                  else printf("%d\n",max);
    
   
}
return 0;
}



/*

Dificit为<=0的情况也试过了,一直WA,
无语了,谁能告诉我错在哪儿呢....

*/


                 
                
                         
                              
                              

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