tarjan找割点..不是割点答案就是(N-1)*2, 是割点的话就在tarjan的时候顺便统计一下 ------------------------------------------------------------------------------- #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; co…
#include <iostream> #include <cstring> #include <cstdio> using namespace std; typedef long long ll; ; ; int dfn[maxn], low[maxn], head[maxn]; ll ans[maxn], siz[maxn]; int n, m, tot, num, root; bool cut[maxn]; struct edge{ int to, next; }…