#include<bits/stdc++.h>
using namespace std;
const int N = 10010 , M = 50010;
int n, m;
int h[N], e[M], ne[M], idx;
int dfn[N], low[N], timestamp; // 时间戳
int stk[N], top;
bool in_stk[N];
int id[N], scc_cnt; // 每个点所属分量编号
int dout[N], Size[N]; // 出度数组 和 统计连通分量里面点的个数的数组
void add(int a, int b)
{
e[idx] = b, ne[idx] = h[a
Tarjan算法例题及模板
最新推荐文章于 2024-05-14 22:20:59 发布