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 |
可能是初值问题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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator