![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
双连通
文章平均质量分 55
不吸血的Vampire
这个作者很懒,什么都没留下…
展开
-
点-双连通分量模板
by:白书#define M 10000int pre[M],dfs_clock,iscut[M],low[M],bcc_cnt,bccno[M];vectorG[M],bcc[M];struct Edge{ int u,v; Edge(int from,int to) { u=from; v=to; }};stack S;int dfs(int u,int fa原创 2014-07-05 20:18:13 · 863 阅读 · 0 评论 -
HDU 4587 TWO NODES (双连通割点应用)
题意:N个点(0~n-1),M条无向边,问去掉2个点后最多的连通分块有多少。先去掉一个点求出各个割点,并在dfs过程中求出去掉这个割点有多少个连通分块(将iscut[u]=true改为iscut[u]++),这样子第二次就可以直接找出最多的连通分块了。#include#include#include#include#include#include#inclu原创 2014-07-05 21:47:19 · 657 阅读 · 0 评论