| ||||||||||
| 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 | |||||||||
这题我的解题思路因为求的是不增序列,所以序列中的高度一定是出现过的高度,可一推下.
1,排序高度
2,dp[i][j],第i根柱子高度为第j高
3,dp[i][j]=min{dp[i-1][k]}+abs(aa[j]-aa[k]),k<=j;
4,输出dp[n-1][j],0=<j<n;最下值
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator