hannibal_Iecter
hannibal_Iecter
全部文章
主席树
ac自动机(7)
bitset(2)
BSGS(1)
dfs(3)
DP(19)
ODT(1)
splay(1)
ST表(2)
tarjan(2)
中途相遇法(1)
二分图(1)
二叉树(1)
分块(1)
分治(3)
回文树(1)
多校(1)
字符串(1)
容斥(2)
平衡树(5)
并查集(1)
快速乘(1)
数学(9)
整体二分(1)
树链剖分(2)
模拟退火(2)
水题(1)
爬山算法(1)
矩阵快速幂(2)
线性基(1)
线段树(10)
编译器(2)
背包(2)
莫队(1)
计算几何(1)
随机数(1)
高精度(1)
归档
标签
去牛客网
登录
/
注册
hannibal_Iecter的博客
全部文章
/ 主席树
(共4篇)
可持久化并查集【主席树】
题目链接 主席树叶子节点维护fa数组,每次的修改操作只会改变一个叶子结点的fa值,所以考虑动态开点。合并的时候启发式合并就行了。 #pragma GCC optimize(2) #include<bits/stdc++.h> using namespace std; #define f...
2019-08-10
0
414
主席树求区间distinct num
题目地址](https://www.spoj.com/problems/DQUERY/en/) #pragma GCC optimize(2) #include<bits/stdc++.h> using namespace std; #define lowbit(x) ((x)&...
2018-10-30
0
360
主席树求某一时刻权值第k大的数
地址 int Case = 1, n, m; struct node{ int l, r; ll sum, cnt; }tr[maxn<<5]; int root[maxn], tot; struct date{ int val; int t, flag; bool oper...
2018-10-07
0
303
POJ2104【主席树】【整体二分】
题目链接 kth number 主 席 树 主...
2018-10-07
0
344