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

DP简单容易想,可以转化成Floyd算法和Dijkstra算法。

Posted by Pumbaa at 2009-08-12 07:37:16 on Problem 2241
DP思路:

1,首先每个点可以分成3种情况,就是3个block。

2,对于某一个block我们很容易想到那个block可以放上去。

3.我们用maxheight[i]保存以第i个block块为底最大高度。

很容易想到DP公式:

如果第j(任意一个)个block可以放到第i个block上,则

maxheight[i]=max(maxheight[i],第i个塔的高+maxheight[j]);
http://blog.sina.com.cn/s/blog_61533c9b0100eoad.html 有详细解题报告。

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