![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小生成树
Head_Hard
菜逼一个
展开
-
hdu 1233 还是畅通工程【最小生成树】
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 当N为0时,输入结束,该用例不被处理。 Output对每个测原创 2017-12-10 10:37:32 · 190 阅读 · 0 评论 -
hrbust 1795发现王国之旅 【最小生成树】
发现王国之旅 Time Limit: 1000 MS Memory Limit: 32768 K Total Submit: 30(17 users) Total Accepted: 17(15 users) Rating: Special Judge: No Description 暑期将至,壮原创 2017-12-15 13:19:43 · 227 阅读 · 0 评论 -
hrbust 2038 联系网络 【最小生成树】
联系网络 Time Limit: 1000 MS Memory Limit: 32768 K Total Submit: 181(60 users) Total Accepted: 84(54 users) Rating: Special Judge: No Description TwIStOy原创 2017-12-14 22:51:36 · 181 阅读 · 0 评论 -
HDU1162 Eddy's picture 【最小生成树】
Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friend原创 2018-04-10 16:07:57 · 128 阅读 · 0 评论 -
POJ 1789 Truck History 【最小生成树】
#include<cstdio> #include<algorithm> using namespace std; const int MAX = 2e6 + 7; int pre[MAX]; struct node{ int x, y, len; bool operator < (const node &a) const{ ...原创 2018-07-25 10:34:16 · 132 阅读 · 0 评论 -
POJ 1258 Agri-Net 【最小生成树】
Agri-Net Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 67336 Accepted: 27876 Description Farmer John has been elected mayor of his town! One of his campaign promises...原创 2018-07-25 15:41:46 · 138 阅读 · 0 评论 -
POJ Borg Maze 【BFS + 最小生成树】
Borg Maze Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17025 Accepted: 5497 Description The Borg is an immensely powerful race of enhanced humanoids from the delta ...原创 2018-07-27 20:09:59 · 186 阅读 · 0 评论 -
Codeforces Round #529 (Div. 3)F. Make It Connected 【最小生成树】
You are given an undirected graph consisting of nn vertices. A number is written on each vertex; the number on vertex ii is aiai. Initially there are no edges in the graph. You may add some edges to ...原创 2018-12-28 10:12:01 · 440 阅读 · 0 评论