Edge to the Root ZOJ - 3949 (树形DP)
Given a tree with n vertices, we want to add an edge between vertex 1 and vertex x, so that the sum of d(1, v) for all vertices v in the tree is minimized, where d(u, v) is the minimum number of edges...
原创
2018-04-10 19:57:28 ·
223 阅读 ·
0 评论