连通图
无向图和有向图的区别
无向图
任意两点都相互能到达
无向图割点
bool ge[maxn];
int dfn[maxn],low[maxn],dfscnt;
void tarjan(int x,int rt){
dfn[x]=low[x]=++dfscnt;
int child=0;
for(int i=head[x];i;i=nex[i]){
int y=to[i];
if(!dfn[y]){
tarjan(y,rt);
low[x]=min(low[x],low[y]);
if(x==rt)child++;
else if(low[y]>=dfn[x])ge[x]=1;
}
else low[x]=min(low[x],dfn[y]);
}
if(x==rt&&child>=2)ge[x]=1;
}
无向图割边
void tarjan(int u