
最小生成树
tjx_belief
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ - 1797 Heavy Transportation
原题链接Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his原创 2017-02-18 13:18:25 · 212 阅读 · 0 评论 -
POJ 3723 Conscription【招募士兵】
原题链接思路:把男生女生都当作顶点,把把亲密度的负数当作权值,就是最小生成树问题。AC代码:#include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cstring> using namespace std; //《挑战》 P109 //把男生女生都当作顶点,把把亲密度的负数当作权原创 2017-03-02 18:30:36 · 333 阅读 · 0 评论 -
POJ 1258 Agri-Net
原题链接思路:经典最小生成树问题。AC代码:#include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cstring> #include <cmath> using namespace std;//思路:图论,最小生成树,prim选点法(kruskal选边法也可) int N; in原创 2017-03-17 19:24:01 · 196 阅读 · 0 评论