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 bsblcc at 2015-12-03 12:56:48 on Problem 2385
输入的时候处理一下,把相邻相同的树合并在一起,这样tree[i],tree[i-1]的转移一定需要移动一次,
dp[i][j]=max(dp[i-2][j],dp[i-1][j-1])+tree[i];

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