![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
文章平均质量分 84
阿阿阿阿_欢
勿忘初心
展开
-
POJ2253--Frogger FLOYD【最小树变形】
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 27378 Accepted: 8901DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenl原创 2015-02-14 00:40:32 · 456 阅读 · 0 评论 -
POJ 2421--Constructing Roads【水题 && 最小生成树 && kruskal】
Constructing RoadsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 20889 Accepted: 8817DescriptionThere are N villages, which are numbered from 1 to N,原创 2015-08-10 18:42:16 · 664 阅读 · 0 评论 -
HDU 1223--还是畅通工程【prim && kruskal】
很久以前写的题的,当时用的是并查集写的,当时觉得麻烦就没用prime写过,前几天长木给讲了一种简单的模板,果然代码精简了很多。#include#includeusing namespace std;struct app{ int st,ed,w;};int p[1000];int find (int x){ return p[x]==x?x:p[x]=find(p[x原创 2015-01-11 13:36:17 · 454 阅读 · 0 评论 -
POJ 2031 && ZOJ 1718--Building a Space Station【最小生成树 && kurskal && 水题】
Building a Space StationTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5655 Accepted: 2848DescriptionYou are a member of the space station engineerin原创 2015-08-10 17:38:25 · 892 阅读 · 0 评论 -
POJ 1861 && ZOJ 1542--Network 【最小生成树 && kruscal && 水题】
题目大意:给n个点,m条边。求一棵生成树,并且满足任意两点之间的距离的最大值最小。输出这个最大值,然后输出树的边的数量,最后输出树的每条边。题目思路:对于一个生成树来说,它的最大边满足在所有的生成树的最大边里最小,这其实就是一颗最小生成树。#include #include #include #include #define maxn 1010#define maxm 200原创 2015-08-10 17:02:33 · 920 阅读 · 1 评论 -
POJ1287 && ZOJ 1372--Networking【水题 && kruskal】
NetworkingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7259 Accepted: 3941DescriptionYou are assigned to design network connections between certain原创 2015-08-10 18:14:08 · 427 阅读 · 0 评论 -
HDU 1863--畅通工程【Prim && kruskal】
畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18267 Accepted Submission(s): 7753Problem Description省政府“畅通工程”的目标是使全省任何两个村庄间都原创 2015-01-11 21:54:06 · 535 阅读 · 0 评论 -
POJ 1258--Agri-Net【最小生成树 && Kruskal && 水题】
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 45145 Accepted: 18534DescriptionFarmer John has been elected mayor of his town! One of his cam原创 2015-08-10 15:26:35 · 574 阅读 · 0 评论 -
HDU 1875--畅通工程再续【Kruskal】
畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17033 Accepted Submission(s): 5305Problem Description相信大家都听说一个“百岛湖”的地方吧,百岛湖原创 2015-03-31 23:01:48 · 449 阅读 · 0 评论 -
HDU 1301--Jungle Roads 【Kruskal】
Jungle RoadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4808 Accepted Submission(s): 3530Problem DescriptionThe Head El原创 2015-03-31 19:08:56 · 451 阅读 · 0 评论 -
HDU 2682--Tree【最小生成树】
Play a gameTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1673 Accepted Submission(s): 1349Problem DescriptionNew Year is Coming原创 2015-03-26 10:47:56 · 460 阅读 · 0 评论 -
POJ--1789 Truck History【prim】
Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19711 Accepted: 7604DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types原创 2015-02-13 19:52:02 · 352 阅读 · 0 评论 -
HDU 1879--继续畅通工程【kruskal && 最小生成树 && 水题】
继续畅通工程Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17798 Accepted Submission(s): 7662Problem Description省政府“畅通工程”的目标是使全省任何两个村庄原创 2015-08-10 21:10:10 · 614 阅读 · 0 评论