![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
zhangwei1120112119
这个作者很懒,什么都没留下…
展开
-
poj2421 Constructing Roads
描述: 有n个村庄,编号为1 ,2 ,3 ,,,n 应该建造道路使他们互相可达 对输入数据 3 0 990 692 990 0 179 692 179 0 1 1 2 意思有3个村庄, 0 990 692 990 0 179 692 179 0 意思是1号到1,2,3的距离分别为0 990 692 1 1 2 意思是有一条道路已经接通,就是1号与2号间的道路原创 2012-11-15 19:38:27 · 1624 阅读 · 0 评论 -
poj1861 Network
4 6 1 2 1 1 3 1 1 4 2 2 3 1 3 4 1 2 4 1 4个城市,6条道路,求最小生成树 套用kruskal算法过 #include #include #include using namespace std; class cable { public: int x; int y; int L;//x-y int id; bool flag;//初始原创 2013-04-04 18:51:41 · 447 阅读 · 0 评论