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 fish47 at 2015-02-24 00:46:51 on Problem 2486 and last updated at 2015-02-24 00:49:35
In Reply To:WA的注意一下答案不一定在走了K步取到 Posted by:sweetdum at 2013-10-17 17:41:17
我也遇过这样的问题,测试数据在下面。
应该是初值没处理好,如果允许原地踏步,不论走几步,都可以吃到出发结点的苹果。
这样处理之后,可以直接取 max(f(0, step_count, 1), f(0, step_count, 0)) 作为最后答案。

3 5
3 5 9 
1 3
1 2

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