摘要:
不知道说些啥 #include<bits/stdc++.h> using namespace std; const int N=500010; int f[N]; int dep[N],siz[N]; int n,m; int F(int x){//递归版路径压缩 if(f[x]==x)return 阅读全文
摘要:
生成树与prufer序列相互转换的模板: #include<bits/stdc++.h> using namespace std; const int N=500010; struct node{ int nxt,to; }e[N]; int head[N],cnt,fa[N]; int in[N] 阅读全文
摘要:
模板题:CF896C #include<bits/stdc++.h> #define SIT set<ODT>::iterator #define VIT vector<pair<long long,long long>>::iterator using namespace std; const i 阅读全文
摘要:
模板题:luogu4169 有个点要吸氧才能过 #include<bits/stdc++.h> using namespace std; const double alpha=0.8; const int M=3; const int N=3000010; const int inf=0x3f3f3 阅读全文
摘要:
狭义的圆方树 洛谷P5236 圆方树模板题 #include<bits/stdc++.h> using namespace std; const int N=3e5+10; struct node{ int nxt,w,to; }e[N],E[N]; int head[N],Head[N],cnt, 阅读全文