
最小生成树
yzllz001
A programmer
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 1233
畅通工程 贪心最小生成树 #include #include #include using namespace std; int a[10001]; struct st { int x,y,len; }s[100001]; int find(int x) { while(a[x]!=x) { x=a[x]; } return x; } int un(int x,int原创 2016-04-30 11:23:11 · 393 阅读 · 0 评论 -
HDU 1301-Jungle Roads (Kruscal 最小生成树)
Description The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes r原创 2016-06-30 12:04:01 · 860 阅读 · 0 评论