小不点搜索 登录

【算法进阶】【杂题选讲】luogu P2341 [USACO03FALL / HAOI2006] 受欢迎的牛 G SCC强连通分量讲解及应用

#include using namespace std;const int N=1e4+2;stack s;bool in[N],d[N]; int n,m,x,y,dfn[N],low[N],scc[N],sz[N],cnt,ans;vector v[N]; inline void tarjan(int i){    dfn[i]=low[i]=++cnt,in[i]=1,s.push(i);    for(int t:v[i])       if(! 【算法进阶】【杂题选讲】luogu P2341 [USACO03FALL / HAOI2006] 受欢迎的牛 G SCC强连通分量讲解及应用