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 |
Re:按都不懂乃们为什么要分类,贴In Reply To:Re:按都不懂乃们为什么要分类,贴 Posted by:Dumpling at 2013-02-11 00:40:46 > while (scanf("%lld%lld", &s, &d) != EOF) { > cs = 5, cd = 0; > while (cs * s >= cd * d) > --cs, ++cd; > int64 ans = (cs * s - cd * d) * 2ll; > ans += min(cs, 2ll) * s - max(2ll - cs, 0ll) * d; > if (ans <= 0) > printf("Deficit\n"); > else > printf("%lld\n", ans); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator