![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
主席树
wwt9b15bs
这个作者很懒,什么都没留下…
展开
-
【模板】主席树
转自大哥的博客 另一位大佬的博客讲解主席树讲的很好 #include<cstdio> #include<algorithm> using namespace std; const int N=1e6+10; int t,tot,n,m,sz; int a[N],b[N],ls[N],rs[N],sum[N],rt[N]; //sum[o]记录的是该节点区间内出现的数...转载 2018-09-09 07:22:46 · 110 阅读 · 0 评论 -
【题解】hdu4417[2012 ACM/ICPC Asia Regional Hangzhou Online] (2018-07-28校赛 线段树入门2 A)主席树
题目 题目链接 #include<cstdio> #include<algorithm> using namespace std; const int N=5e6+10; int a[N],b[N],rt[N],ls[N],rs[N],sum[N]; int t,sz,tot,ca,n,m; void build(int &o,int l,int r) { ...原创 2018-09-09 07:22:51 · 195 阅读 · 0 评论