无向图缩点:tarjan点双与边双缩点(模板)
e-DCC边双缩点:(用之前记得init) cnt1是从2开始的 const int N=1e4+100; const int M=1e5+100; struct Egde { int to,next; }edge1[M],edge2[M]; int head1[N],head2[N],low[N],dfn[N],c[N],num,cnt1,cnt2,dcc,n,m; bool bridge[M]; void addedge1(int u,int v) { edge1[cnt1].to=v; edge1[cnt1].next=head1[u]; head1[u]=cnt1++; }
下载地址
用户评论