![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
主席树
蜗角虚名羊
这个作者很懒,什么都没留下…
展开
-
洛谷P3834 【模板】可持久化线段树 1(主席树)
题目 题解 #include<bits/stdc++.h> using namespace std; const int N=200003,M=5000003; #define mid (l+r>>1) int a[N],b[N],L[M],R[M],sum[M],tot,i,T[M],rt,n,q,m,x,y,k; inline int read(){ c...转载 2018-06-14 09:47:13 · 131 阅读 · 0 评论 -
51nod1440 迈克打电话
题目 和阿狸的打字机很像,差不多的套路 #include<bits/stdc++.h> using namespace std; #define mid ((l+r)>>1) const int N=200002,M=4000002; struct node{ int to,ne; }e[N]; int l1[N],r1[N],l[N],r[N],tr[N][26],su...原创 2018-12-20 11:13:34 · 205 阅读 · 0 评论 -
bzoj3674: 可持久化并查集加强版
题目 #include<bits/stdc++.h> using namespace std; #define mid ((l+r)>>1) const int N=200002,M=10000002; int rt[N],cnt,L[M],R[M],dep[M],n,m,opt,x,rx,ry,las,v[M],y,i; inline char gc(){ static...原创 2018-12-11 08:58:18 · 189 阅读 · 0 评论 -
划分树 主席树
文章目录[hdu2665(主席树模板)](http://acm.hdu.edu.cn/showproblem.php?pid=2665)[poj2104(划分树模板)](http://poj.org/problem?id=2104)[bzoj1901(树状数组套主席树)](http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=19...原创 2019-01-12 20:51:38 · 218 阅读 · 0 评论 -
bzoj4299: Codechef FRBSUM
题目 题解转载 2019-02-26 20:21:22 · 147 阅读 · 0 评论