![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最小(大)生成树
文章平均质量分 61
※夏日星空※
这个作者很懒,什么都没留下…
展开
-
POJ 2377 Bad Cowtractors (最大生成树)
Bad Cowtractors Description Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1..N. FJ has already done some原创 2016-07-30 17:33:49 · 158 阅读 · 0 评论 -
HDU 1233 还是畅通工程(模板)
还是畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 40178 Accepted Submission(s): 18263 Problem Description 某省调查乡村交通状况,得到的统计表原创 2016-08-03 20:56:22 · 174 阅读 · 0 评论 -
poj 2485 Highways(prime算法模板)
Highways Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit Status Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia h原创 2016-08-04 09:16:15 · 189 阅读 · 0 评论 -
poj 1287 Networking
Networking Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu Submit Status Description You are assigned to design network connections between certain points in原创 2016-08-04 09:48:18 · 143 阅读 · 0 评论 -
HDU-1863--畅通工程
畅通工程 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 24675 Accepted Submission(s): 10762 Problem Description 省政府“畅通工程”的目标是使全省任原创 2016-07-03 22:14:08 · 267 阅读 · 0 评论 -
生成树的两种算法 kruskal 和 prim
1、kruscal 模板: //kruscal 算法 #include #include #include using namespace std; int per[105],n; struct node//结构体来保存边 { int a,b; int dis; }x[5005]; bool cmp(node a,node b) { return a.dis<b.d原创 2016-08-03 10:54:39 · 262 阅读 · 0 评论 -
惠民工程
时间限制: 1 Sec 内存限制: 128 MB 提交: 81 解决: 33 [提交][状态][讨论版] 题目描述 市政府“惠民工程”的目标是在全市n个居民点间之架设煤气管道(但不一定有直接的管道相连,只要能间接通过管道可达即可)。很显然最多可架设 n(n-1)/2条管道,然而实际上要连通n个居民点只需架设n-1条管道就可以了。现请你编写程序,计算出该惠民工程需要的最低成本。 输入 测...原创 2018-09-09 11:29:16 · 250 阅读 · 0 评论