
最小生成树
文章平均质量分 52
404-unkown
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ2377--Bad Cowtractors
题目大意:Bessie为了破坏FJ的计划,要搞出一个最大生成树。 分析:就是把最小生成树算法的一个符号改一下就行了。另外,要判断图是否联通 代码#include #include #include using namespace std; const int maxn = 20010; struct Edge{ int s, e, w; bool op原创 2015-08-05 11:56:04 · 298 阅读 · 0 评论 -
POJ2395--Out of Hay
题目大意:求最小生成树最大边。 分析:水题。在模板里加一个ans记录加入的边即可。 代码: #include #include #include using namespace std; const int maxn = 10010; struct Edge{ int s, e, w; bool operator < (const Edge & e1原创 2015-08-05 12:18:24 · 412 阅读 · 0 评论