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

Re:关于这题,菜鸟的想法..

Posted by 323232 at 2009-05-01 14:55:58 on Problem 3709
In Reply To:关于这题,菜鸟的想法.. Posted by:huicpc035 at 2009-02-21 18:16:44
> dp,由于是限定了非递减,故dp方程为dp[i] = min{dp[j] + sum[i,j-1] - a[i]*(j - 1)}
> {i + k<=j<=n + 1};
> 很明显,n^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