摘要: /*思路参考大牛,我脑袋被lv踢了,居然想到用数状数组写。。。思路:并查集,先把不许要删的边用并查集合并,然后把需要删的边逆序加入到并查集中。。。。My Code:*/#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int N = 100005;struct node { int s; int e;}g[N];int parent[N];int c[N];int ans[N];int Rank[N];bool vis[N];void init(in 阅读全文
posted @ 2011-11-21 20:56 AC_Von 阅读(285) 评论(0) 推荐(0) 编辑