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 |
一个很水的思路 (弱菜只能用水方法了。。。)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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator