# [图论] 求边双联通分量

## 代码

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;
const int MAXN = 100000 + 10;
const int MAXM = 200000 + 10;

int dfn[MAXN], low[MAXN], time_stamp;
int isBridge[MAXM];

int n, m;
int bcc_cnt;
vector <int> ebcc[MAXM];

int x = 0;
char ch = getchar();

while(ch < '0' || ch > '9'){
ch = getchar();
}

while('0' <= ch && ch <= '9'){
x = x*10 + ch - '0';
ch = getchar();
}

return x;
}

inline void add(int a, int b){
to[tot] = b;
}

inline void tarjan(int x, int f){
dfn[x] = low[x] = ++time_stamp;

for(register int i=Head[x]; i != -1; i=Next[i]){
int v = to[i];

if(!dfn[v]){
tarjan(v, x);

low[x] = min(low[x], low[v]);

if(low[v] > dfn[x]){
isBridge[i] = isBridge[i^1] = 1;
}
}else if(dfn[v] < dfn[x] && v != f){
low[x] = min(low[x], dfn[v]);
}
}
}

inline void dfs(int x, int bcc_number){
dfn[x] = true;
ebcc[bcc_number].push_back(x);

for(register int i=Head[x]; i != -1; i=Next[i]){
int v = to[i];

if(isBridge[i]){
continue;
}

if(!dfn[v]){
dfs(v, bcc_number);
}
}
}

inline void find_ebcc(){
for(register int i=1; i<=n; i++)
if(!dfn[i])
tarjan(i, 0);

memset(dfn, 0, sizeof(dfn));

for(register int i=1; i<=n; i++){
if(!dfn[i]){
bcc_cnt++;
dfs(i, bcc_cnt);
}
}
}

inline void init(){