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 chinaeli at 2009-01-20 16:22:40 on Problem 2054
opt[i][j]=min( opt[i-1][k] )+i*cost[j] ( 1<=k<=n && k!=j && k可以作为j的前驱)
所谓前驱,就是涂完k后,可以直接涂j的点,也就是j的父节点或者是父节点的兄弟节点的孩子节点.
但是预处理要把j的前驱找出来有点麻烦。。。


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