| ||||||||||
| 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 | |||||||||
关于Problem 2479的超时问题我用动规的方法先求1..i (i from 1 to n)的子序列的最大和 b[i]
再求i..n(i from n..2)的子序列的最大和 c[i]
最后把所给序列分成1..i & i+1..n 2个序列(分解n-1次)
maximum= max{b[i]+c[i+1]} (i from 1 to n-1)
这3个过程每个过程都是确保在o(n)内完成的
为什么最后还会Time Limit Exceeded
哪位牛人可以帮忙解答下
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator