HDU 1233 还是畅通问题

来源:互联网 发布:c语言网站 编辑:程序博客网 时间:2024/06/15 14:31

 

http://acm.hdu.edu.cn/showproblem.php?pid=1233

 

 

解题思路:用Prim算法求最小生成树,然后输出总权值。