Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这题能用dp做吗?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator