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 ccyjava at 2009-07-04 10:32:54 on Problem 2181
我的这个是o(n^2),但这不是重点。。我想知道我为什么错了,思路有问题吗
我是这么想的:
用in[]存输入数据,a[i][0]是第i步吃了的最大值,a[i][1]是第i步吃了的走的次数
求a[i+1][1]的值就是从1到i中a[j][0]+((a[j][1]+1)%2==0?(-1):1)*in[i+1]的最大值
然后一直求到最后。。。嗯。就是这样。。思路有错吗???

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