摘要:
题意: 给一个有 n 个节点的有向图,和 m 条有向边,问这个图中是否任意两个点都能互达。分析: 任意两个点能够互达,即要求图的强连通分量的个数为一,求出图的强连通子图的个数即可。PS : Tarjan算法 详解 http://www.byvoid.com/blog/scc-tarjan/code:#include<stdio.h>#include<string.h>#define clr(x)memset(x,0,sizeof(x))const int maxn=100010;struct node{ int to; int next;}q[100010];int h 阅读全文
posted @ 2012-07-14 21:06
'wind
阅读(217)
评论(0)
推荐(0)


浙公网安备 33010602011771号