
并查集
tjx_belief
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
***POJ 1182 食物链
思路:并查集。x,x+N,x+2N分别是编号x的动物为A/B/C类的可能性。每给出一句话,将同时成立的可能性加入一个并查集,判断是否矛盾。原创 2017-02-22 20:38:47 · 213 阅读 · 0 评论 -
POJ 2236 Wireless Network
原题链接思路:并查集。AC代码:#include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cstring> #include <cmath> #include <vector> #include <queue> using namespace std;//思路:并查集 struct原创 2017-03-17 18:36:24 · 185 阅读 · 0 评论