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

貌似测试了200组数据了,但是还没没ac,请大神找找问题!

Posted by zzxy at 2011-03-05 23:24:24 on Problem 1017
#include<stdio.h>
void main()
{


    int sum,a,b,c,d,e,f,x,y,z;

    while (scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)){
       if (a+b+c+d+e+f==0)
           break;
       sum=0;
       sum=d+e+f+c/4;



       if (c%4>0){
           sum++;
          if ((b-5+(c%4-1)*2-5*d)/9>0)
          sum+=(b-5+(c%4-1)*2-5*d+8)/9;}
          else
          if ((b-5*d)/9>0)
          sum+=(b-5*d+8)/9;



       if (a>(sum*36-36*f-25*e-16*d-4*b-9*c))
       {

       sum+=(a-((sum*36-36*f-25*e-16*d-4*b-9*c))+35)/36;}
       printf("%d\n",sum);
       }
}

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