2012年8月7日
摘要: 未完成,TLE要查: 1 #include<stdio.h> 2 #include<string.h> 3 #define MAXN 10000 + 10 4 5 int first[MAXN], next[50010],u[MAXN],v[MAXN],n, m, ans1; 6 int dfn[MAXN],low[MAXN],col[MAXN],stk[MAXN],ins[MAXN],ind,top,cols,tmp; 7 int outdg[MAXN],zeroout; 8 9 void dfs(int u)10 {11 dfn[u] = low[u] = ++in 阅读全文
posted @ 2012-08-07 15:25 BFP 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 强联通分量模版题,tarjan算法: 1 #include<stdio.h> 2 #include<string.h> 3 #define MAXN 110 4 5 int n, p, ans1, ans2, u[MAXN*MAXN], v[MAXN*MAXN], next[MAXN*MAXN], first[MAXN]; 6 int dfn[MAXN], low[MAXN], col[MAXN], stk[MAXN], ins[MAXN], ind, top, cols, tmp; 7 int indg[MAXN], outdg[MAXN], zeroin, zero 阅读全文
posted @ 2012-08-07 10:12 BFP 阅读(181) 评论(0) 推荐(0) 编辑