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

直接一维dp

Posted by logics_space at 2009-01-17 08:38:57 on Problem 3661
In Reply To:Re:这个题用什么方法? Posted by:wyh4104314 at 2008-10-01 18:54:05
 状态为每分钟疲劳度为0的时候,所以只有最多10^4个状态,答案为dp[n],
 状态转移即当前状态dp【i】是从他前面最近疲劳的疲劳度为零的时刻,有dp【i-1】,
dp【i-2】,....,dp【i-2*m】 预处理一下前状态到现状态的路程长度,从中选择一个最大的就可以了

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