连通性
life4711
这个作者很懒,什么都没留下…
展开
-
CF22E 加最少的边使原有向图边成强连通图
http://codeforces.com/problemset/problem/22/EE. Schemetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output原创 2015-01-08 12:11:02 · 1514 阅读 · 0 评论 -
强连通分量+缩点(记录所缩点的个数)
#include #include #include #include using namespace std;#define M 10005#define N 105struct note{ int v,next;}edge[M];int head[N],dfn[N],low[N],belong[N],index,ip,cnt_tar,count[N];stack原创 2014-06-29 17:19:06 · 1102 阅读 · 0 评论 -
hdu 4738 双连通图的桥
http://acm.hdu.edu.cn/showproblem.php?pid=4738Problem DescriptionCaocao was defeated by Zhuge Liang and Zhou Yu in the battle of Chibi. But he wouldn't give up. Caocao's army still was not g原创 2014-09-06 19:37:15 · 653 阅读 · 0 评论 -
hdu4612 连通性,求树的直径,加一边求最少桥
http://acm.hdu.edu.cn/showproblem.php?pid=4612Problem Description N planets are connected by M bidirectional channels that allow instant transportation. It's always possible to travel b原创 2015-03-03 17:06:58 · 1692 阅读 · 0 评论 -
hdu2460&&poj3694 缩点+lca变形
http://acm.hdu.edu.cn/showproblem.php?pid=2460http://poj.org/problem?id=3694Problem DescriptionA network administrator manages a large network. The network consists of N computers and M原创 2015-03-02 11:58:35 · 851 阅读 · 0 评论 -
poj3177&&poj3352 无向图的双连通问题(至少加几条边原图变为双连通图)
题目链接:http://poj.org/problem?id=3177解题思路:原创 2014-10-10 14:43:42 · 777 阅读 · 0 评论 -
hdu4587 求割点变形
http://acm.hdu.edu.cn/showproblem.php?pid=4587Problem DescriptionSuppose that G is an undirected graph, and the value of stab is defined as follows:Among the expression,G-i, -j is the原创 2015-03-02 21:58:46 · 1063 阅读 · 0 评论 -
Uva 796 求桥
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=737/***Uva 796 求桥题目要求:输出题目中所有的桥,按其所连接的点从小到大的顺序输出解题思路:tarjan算法,所有树枝边都是桥(dfn[u]<low[v]),利用vector存储一下就可原创 2015-02-27 18:15:44 · 1384 阅读 · 0 评论 -
求无向图的割点和桥
/*** 求 无向图的割点和桥* 可以找出割点和桥,求删掉每个点后增加的连通块。* 需要注意重边的处理,可以先用矩阵存,再转邻接表,或者进行判重* 调用solve输出割点数,全局变量bridge记录边的个数*/#include #include #include #include using namespace std;const int maxn=10010;co原创 2015-02-27 10:27:45 · 2552 阅读 · 0 评论 -
Uva 315 求无向图的割点的个数
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=251A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting原创 2015-02-27 10:21:26 · 1177 阅读 · 0 评论 -
poj 3259 判断是否存在负权环
http://poj.org/problem?id=3259原创 2014-06-21 09:12:18 · 681 阅读 · 0 评论 -
hdu 4635 强连通分量+缩点
http://acm.hdu.edu.cn/showproblem.php?pid=4635Problem DescriptionGive a simple directed graph with N nodes and M edges. Please tell me the maximum number of the edges you can add that the gr原创 2015-02-26 17:51:59 · 1103 阅读 · 0 评论 -
CF 22 C 带割点的图的构造
http://codeforces.com/problemset/problem/22/CC. System Administratortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutpu原创 2015-01-08 16:16:41 · 1029 阅读 · 0 评论 -
图的割点、桥与双连通分支
[点连通度与边连通度]在一个无向连通图中,如果有一个顶点集合,删除这个顶点集合,以及这个集合中所有顶点相关联的边以后,原图变成多个连通块,就称这个点集为割点集合。一个图的点连通度的定义为,最小割点集合中的顶点数。类似的,如果有一个边集合,删除这个边集合以后,原图变成多个连通块,就称这个点集为割边集合。一个图的边连通度的定义为,最小割边集合中的边数。[双连通图、割点与桥]如果一个转载 2014-10-10 14:54:45 · 753 阅读 · 0 评论 -
acdreamOJ 1236 求无向图的桥
http://115.28.76.232/problem?pid=1236Problem Description Ferry Kingdom is a nice little country located on N islands that are connected by M bridges. All bridges are very beautiful and原创 2014-10-08 21:41:35 · 733 阅读 · 0 评论 -
Uva 11324 强连通分量求解 + 缩点——有向无环图求最长路径
http://vjudge.net/contest/view.action?cid=48251#problem/E原创 2014-06-29 16:53:35 · 1167 阅读 · 0 评论 -
连通性问题 之 Tarjan算法求强连通分量
如果有向图G的任何两定点都可以相互到达,足额chen原创 2014-04-08 12:44:10 · 1104 阅读 · 0 评论 -
POJ 1236 tarjan 算法求强连通分量
http://poj.org/problem?id=1236DescriptionA number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to原创 2014-04-08 15:19:54 · 904 阅读 · 0 评论 -
poj1904 二分图匹配+强连通分量
http://poj.org/problem?id=1904DescriptionOnce upon a time there lived a king and he had N sons. And there were N beautiful girls in the kingdom and the king knew about each of his sons which o原创 2015-08-20 11:33:29 · 912 阅读 · 0 评论