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

贪心算法求解-scau

Posted by qiuyufeng at 2006-11-17 23:16:20 on Problem 1042
首先枚举需要走过的lake个数x,路上花费的时间为t。在这个前提下,只要用总的可以用的时间减去t,剩下的时间就可以用在任意一个lake上,也就可以认为我们能从一个lake瞬间转移到另一个lake。
  在每一种枚举的情况下,我们就可以采用贪心算法,每次找鱼多的lake钓。在这种情况下,它是最优的。
  然后取钓鱼最多那种情况就ok。

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