摘要:
1 /* 2 主要用到强连通分量,缩图。判断某个点(缩点后)的出度为0的那个点的大小。即那个强连通分量的大小。出度为0的点只能有1个或者0个。不可能为多个,否则就不会被所有的其他的点所到达 3 */ 4 // include file 5 #include <cstdio> 6 #include <cstdlib> 7 #include <cstring> 8 #include <cmath> 9 #include <cctype> 10 #include <ctime> 11 12 #include <iostre 阅读全文
摘要:
Strongly connected component主要说下强连通分量,一般简称为sccA directedgraph is called strongly connected if there is a path from each vertex in the graph to every other vertex. Inparticular, this means paths in each direction; a path from a to band also a path from b to a.如果一个有向图的每个顶点到其余的顶点都有一条路径,那么这个有向图就叫强连通的。尤其 阅读全文
摘要:
1 // include file 2 #include <cstdio> 3 #include <cstdlib> 4 #include <cstring> 5 #include <cmath> 6 #include <cctype> 7 #include <ctime> 8 9 #include <iostream> 10 #include <sstream> 11 #include <fstream> 12 #include <iomanip> 13 #include 阅读全文