摘要: 不可抗力 勿念 阅读全文
posted @ 2020-08-19 02:47 passione 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 不知道说些啥 #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 阅读全文
posted @ 2020-02-07 17:20 passione 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 基础知识: 二维的: //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 阅读全文
posted @ 2020-02-06 17:12 passione 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 模板题:洛谷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; 阅读全文
posted @ 2020-02-06 17:00 passione 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 生成树与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] 阅读全文
posted @ 2020-02-03 18:59 passione 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 模板题:CF896C #include<bits/stdc++.h> #define SIT set<ODT>::iterator #define VIT vector<pair<long long,long long>>::iterator using namespace std; const i 阅读全文
posted @ 2020-02-03 16:42 passione 阅读(170) 评论(0) 推荐(1) 编辑
摘要: 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= 阅读全文
posted @ 2020-02-02 22:16 passione 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 模板题: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 阅读全文
posted @ 2020-02-02 17:29 passione 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 狭义的圆方树 洛谷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, 阅读全文
posted @ 2020-02-01 16:35 passione 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 可持久化平衡树 圆方树 斯坦纳树 KD-tree 析合树 珂朵莉树 动态树 prufer序列 最小环 上下界网络流 LGV引理 弦图 矩阵树定理 树上启发式合并 (动态)树分治 最小树形图 图的着色 平面图 哈密顿图 lyndon分解 最小表示法 多项式加速递推 带花树 阅读全文
posted @ 2020-01-31 00:24 passione 阅读(121) 评论(0) 推荐(0) 编辑