#include <iostream>
#include <cstdio>
using namespace std;
struct edge {
int to, next;
} e[50001], d[50001];
int n, m, ind, top, cnt, scc, dfn[10001], low[10001], head[10001], h[10001],
belong[10001], q[10001], hav[10001];
bool inq[10001];
void tarjan(int x) {
dfn[x] = low[x] = ++ind;
q[++top] = x;
inq[x] = 1;
for (int i = head[x]; i; i = e[i].next)
if (!dfn[e[i].to])
tarjan(e[i].to), low[x] = min(low[x], low[e[i].to]);
else ......
阅读全文