
最小生成树
大小vip
这个作者很懒,什么都没留下…
展开
-
Building a Space Station POJ - 2031 (最小生成树)
You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.The space...原创 2019-07-26 16:05:01 · 717 阅读 · 0 评论 -
还是畅通工程(最小生成树 prime算法)
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整数...原创 2019-07-25 11:57:44 · 712 阅读 · 0 评论