02 2020 档案
摘要:不知道说些啥 #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
阅读全文
摘要:基础知识: 二维的: //2-D int my(double A){//处理应精度比大小不准确的问题 if(fabs(A)<eps)return 0; if(A<0)return -1; if(A>0)return 1; return 0; } struct Point{//点 double x,y
阅读全文
摘要:模板题:洛谷p4724 #include<bits/stdc++.h> #define eps 1e-9; using namespace std; const int N=500010; int n; int vis[1010][1010]; struct Point{ double x,y,z;
阅读全文
摘要:生成树与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
阅读全文
摘要:Link Cut Tree: #include<bits/stdc++.h> #define L(x) T[(x)].son[0] #define R(x) T[(x)].son[1] #define fa(x) T[(x)].fa using namespace std; const int N=
阅读全文
摘要:模板题: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,
阅读全文