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 Eov_Second at 2016-12-29 11:26:34 on Problem 1017
In Reply To:这算法太帅了; Posted by:tiaoer at 2012-04-06 23:51:25
for(;scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f),a+b+c+(g=d+e+f);b>(h=5*d+(7-c%4*2)%7)?g+=(b-h+8)/9:0,a>(h=36*(g-f)-25*e-16*d-9*c-4*b)?g+=(a-h+35)/36:0,printf("%d\n",g))g+=c+3>>2;

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