![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
TheWise_lzy
已毕业,社畜一枚
展开
-
TOJ 1638 Out of Hay Prim最大边
1638: Out of Hay 描述The cows have run out of hay, a horrible event that must be remedied immediately. Bessie intends to visit the other farms to survey their hay situation. There are N (2 <= N...原创 2018-07-27 13:08:04 · 158 阅读 · 0 评论 -
TOJ 2415 Arctic Network Prim 第K小边
2415: Arctic Network 描述The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establ...原创 2018-07-26 10:11:00 · 146 阅读 · 0 评论 -
TOJ 2371 Freckles 最小生成树 prim
2371: Freckles 描述In an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad's back to form a picture of the Liberty Bell. Alas, one of the freckles turns out to be a...原创 2018-07-25 21:05:22 · 166 阅读 · 0 评论 -
ACM 最小生成树 Constructing Roads
最小生成树:一个有 n 个结点的连通图的生成树是原图的极小连通子图,且包含原图中的所有 n 个结点,并且有保持图连通的最少的边。 最小生成树可以用kruskal(克鲁斯卡尔)算法或prim(普里姆)算法求出。 在一给定的无向图G = (V, E) 中,(u, v) 代表连接顶点 u 与顶点 v 的边,而 w(u, v) 代表此边的权重,若存在 T 为 E 的子集且为无循环图,...原创 2017-02-06 16:09:49 · 427 阅读 · 0 评论 -
【MOOC-浙大数据结构】第八周的编程作业——最小生成树&关键路径
1.公路村村通#include<stdio.h>#include<string.h>#include<math.h>#include<iostream>#include<string>#include<algorithm>#include<map>#include<set>#in...原创 2019-08-08 20:20:32 · 295 阅读 · 0 评论