摘要:
https://www.luogu.com.cn/problem/P1807 int n,m; int h[N],e[N],ne[N],w[N],idx; void add(int a,int b,int c) { e[idx]=b,w[idx]=c,ne[idx]=h[a],h[a]=idx++; 阅读全文
posted @ 2021-08-26 11:43
LaiYiC
阅读(30)
评论(0)
推荐(0)
摘要:
1.时间戳 int dfn[N],vis[N],cnt; void dfs(int u) { vis[u]=1; dfn[u]=++cnt;//时间戳 for(int i=h[u]; ~i; i=ne[i]) { int j=e[i]; if(vis[j])continue; dfs(j); } } 阅读全文
posted @ 2021-08-26 00:26
LaiYiC
阅读(53)
评论(0)
推荐(0)

浙公网安备 33010602011771号