Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define AC (g[u][i])
- void dfs(int u){
- cn[u]=1,h++,e[u]=d[u]=h;
- F((ll)g[u].size())
- if(!cn[AC])
- dfs(AC),D+=u==r,A[r]=D>=2,e[u]=min(e[u],e[AC]),A[u]|=e[AC]>=d[u]&&u!=r;
- else e[u]=min(e[u],d[AC]);
- }
- #define CLR F(n+1)g[i].clear(),e[i]=d[i]=cn[i]=A[i]=0;h=D=0;
- #define CAL (dfs(r=1))
Advertisement
Add Comment
Please, Sign In to add comment