HDU 6060 RXD and dividing (最小斯坦纳树)

编程入门 行业动态 更新时间:2024-10-10 15:28:25

HDU 6060 RXD and dividing (最小<a href=https://www.elefans.com/category/jswz/34/1686485.html style=斯坦纳树)"/>

HDU 6060 RXD and dividing (最小斯坦纳树)

RXD and dividing

题目链接

Problem Description
RXD has a tree T, with the size of n. Each edge has a cost.
Define f(S) as the the cost of the minimal Steiner Tree of the set S on tree T.
he wants to divide 2,3,4,5,6,…n into k parts S1,S2,S3,…Sk,
where ⋃Si={2,3,…,n} and for all different i,j , we can conclude that Si⋂Sj=∅.
Then he calulates res=∑ki=1f({1}⋃Si).
He wants to maximize the res.
1≤k≤n≤106
the cost of each edge∈[1,105]
Si might be empty.
f(S) means that you need to choose a couple of edges on the tree to make all the points in S connected, and you need to minimize the sum of the cost of these edges. f(S) is equal to the minimal cost

Input
There are several test cases, please keep reading until EOF.

更多推荐

HDU 6060 RXD and dividing (最小斯坦纳树)

本文发布于:2024-03-23 02:10:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1739215.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:斯坦   最小   HDU   dividing   RXD

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!