![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
Albert_Bolt
这个作者很懒,什么都没留下…
展开
-
算法导论—最小生成树(Kruskal和Prim算法)
转载自 http://blog.csdn.net/luoshixian099/article/details/51908175 关于图的几个概念定义:连通图:在无向图中,若任意两个顶点vi” role=”presentation”>vivi都有路径相通,则称该无向图为连通图。强连通图:在有向图中,若任意两个顶点vi” role=”presentation”>vivi都有路径...转载 2018-08-29 10:18:33 · 280 阅读 · 0 评论 -
最小生成树
prim算法void prim(){ int min,k; memset(vis,0,sizeof(vis)); for(int i=1;i<=n;i++) { dis[i]=city[1][i]; } dis[1]=0; vis[1]=1; for(int i=1;i<=n;i++) { ...原创 2018-08-29 11:27:22 · 184 阅读 · 0 评论 -
杭电1102(最小生成树+prim)
Constructing RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build s...原创 2018-08-29 11:33:13 · 285 阅读 · 0 评论 -
POJ 3723(最大生成树+kuruakal)
ConscriptionTime Limit: 1000MS Memory Limit: 65536KDescriptionWindy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect...原创 2018-08-30 09:55:43 · 370 阅读 · 0 评论