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

Re:不明白的看这里

Posted by 19891101 at 2011-10-04 12:00:40 on Problem 3104
In Reply To:不明白的看这里 Posted by:19891101 at 2011-10-04 11:17:15
设某次二分出的一个值是mid:
1、对于一件ai值小于等于mid的衣服,直接晾干即可;
2、对于一件ai值大于mid值的衣服,最少的用时是用机器一段时间,晾干一段时间,设这两段时间分别是x1和x2,那么有mid=x1+x2,ai<=k*x1+x2,解得x1>=(ai-mid)/(k-1) ,所以对(ai-mid)/(k-1)向上取整就是该件衣服的最少用时。

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