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:为什么第一个样例在第一个湖中所花的时间是45?不是25吗? Posted by:2828 at 2010-04-04 16:17:25 If multiple plans exist, choose the one that spends as long as possible at lake 1, even if no fish are expected to be caught in some intervals. If there is still a tie, choose the one that spends as long as possible at lake 2, and so on. 那啥,这个是原题上的话。我觉得大大概意思就是说,如果有多条湖符合要求,那么那个人会选择最靠前的湖,即序号最小的湖……所以,一开始用贪心算法的时候是正常的,当两个都为零的时候,那个人会优先选择序号小的那个湖来消磨时间,因此剩下的时候都耗在了第一条湖上。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator