随笔分类 - 模板总结
摘要:#include <bits/stdc++.h> using namespace std; const int N=1e6+10,M=39989; const double eps=1e-9; int lasans,cnt,n,sh[N]; struct stu { double k,b; }q[N
阅读全文
摘要:强连通分量(有向图) void tarjan(int x) { dfn[x]=low[x]=++cnt; stac[++top]=x; vis[x]=1; for(int i=hd[x];i;i=nxt[i]) { int y=go[i]; if(!dfn[y])//树边 {tarjan(y);lo
阅读全文