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

一个很水的思路 (弱菜只能用水方法了。。。)

Posted by vongang at 2012-08-13 15:14:23 on Problem 1946 and last updated at 2012-08-13 15:14:44
f[l][sp][E][dist]表示当前leader为l,以sp的速度到达leader剩余能量为E时,并且走过的路长度为dist的最小时间。。。
然后记忆化搜索

res = min(res, f(l, i, E - i*i, dist + i) + 1);
res = min(res, f(l+1, i, E - dist, dist));    //这个表示switch leader。


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