#include<bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int h[2 * N], e[2 * N], ne[2 * N], idx; int n, m; int dfn[2*N], low[2*N], timestamp; int stk[2*N], top; bool in_stk[2*N]; int id[2*N], scc; void add(int a, int b) { e[idx] = b; ne[idx] = h[a]; h[a] = idx++; } void tarjan(int ...