最小生成树
Whyckck
这个作者很懒,什么都没留下…
展开
-
最小生成树 prime算法 与克鲁斯卡尔算法
prime算法 用到了贪心的想法,离当前点最近距离的边一定在最小生成树里。 #include<bits/stdc++.h> using namespace std; #define maxn 5005 #define inf 1e9 typedef long long ll; int n,m,mat[maxn][maxn],vis[maxn]; //mat存图,vis表示到当前点...原创 2018-09-07 19:08:37 · 327 阅读 · 0 评论 -
HDU 1233 还是畅通工程
还是畅通工程 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 60190 Accepted Submission(s): 27353 Problem Description 某省调查乡村交通状况,得到的统计表中列出了任意两...原创 2018-09-09 11:01:04 · 137 阅读 · 0 评论 -
【最大权森林】POJ 3723 Conscription
Description Windy 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 them to be his soldiers. To collect a soldier without a...原创 2018-11-19 20:54:41 · 311 阅读 · 0 评论