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

Posted by yc5_yc at 2012-11-09 21:59:25 on Problem 1935
类似Apple Tree
方程:
dp[a][0]=sum{dp[i][0]
            +(2*dist{i,a}|i is in M or dp[i][0]!=0)}(i is a child of a)
dp[a][1]=dp[a][0]
        -max{dp[i][0]-dp[i][1]
            +(dist{i,a}|i is in M or dp[i][0]!=0)}(i is a child of a)

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