Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
确实很棒,我按照这个算法把代码优化成只有一行了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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator