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 ufo008ahw at 2008-07-28 11:35:08 on Problem 3666
因为求的是不增序列,所以序列中的高度一定是出现过的高度,可一推下.
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:
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