点击打开链接
无向图的双连通分量
#include<cstdio>
#include<stack>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
typedef long long LL;
const int maxn = 50010;
struct Edge {
int u, v;
Edge(int u, int v):u(u), v(v) {}
};
int pre[maxn], low[maxn], bccno[maxn], iscut[maxn], bcc_cnt, dfs_clock;
vector<int> g[maxn], bcc[maxn];
stack<Edge> S;
......
阅读全文