摘要:
未完成,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 阅读全文
摘要:
强联通分量模版题,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 阅读全文