最小生成树
Head_Hard
菜逼一个
展开
-
hdu 1233 还是畅通工程【最小生成树】
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 当N为0时,输入结束,该用例不被处理。 Output对每个测原创 2017-12-10 10:37:32 · 195 阅读 · 0 评论 -
hrbust 1795发现王国之旅 【最小生成树】
发现王国之旅Time Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 30(17 users)Total Accepted: 17(15 users)Rating: Special Judge: NoDescription暑期将至,壮原创 2017-12-15 13:19:43 · 231 阅读 · 0 评论 -
hrbust 2038 联系网络 【最小生成树】
联系网络Time Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 181(60 users)Total Accepted: 84(54 users)Rating: Special Judge: NoDescriptionTwIStOy原创 2017-12-14 22:51:36 · 183 阅读 · 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 · 134 阅读 · 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 · 135 阅读 · 0 评论 -
POJ 1258 Agri-Net 【最小生成树】
Agri-NetTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 67336 Accepted: 27876 DescriptionFarmer John has been elected mayor of his town! One of his campaign promises...原创 2018-07-25 15:41:46 · 142 阅读 · 0 评论 -
POJ Borg Maze 【BFS + 最小生成树】
Borg MazeTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 17025 Accepted: 5497 DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta ...原创 2018-07-27 20:09:59 · 189 阅读 · 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 · 457 阅读 · 0 评论