随笔分类 - 数据结构——平衡树
摘要:LCT 对 LCT 有了更深的理解 参考 FlashHu Statement 有 棵树,初始各有 个编号为 的节点,称它们为生长节点。 个操作, 种之一: 将 区间内的树的生长节点加一个编号相同的儿
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; const int maxn = 1e5+5; const int INF = 1e9; struct node{ node *ch[2]; int val,size; node(int v=0,int siz
阅读全文
摘要:普通平衡树: #include<bits/stdc++.h> using namespace std; const int maxn = 1e5+5; const int INF = 1e9; class Splay{ #define root t[0].son[1] private: struct
阅读全文
摘要:普通平衡树: #include<bits/stdc++.h> using namespace std; const int maxn=1e5+5; struct FHQ_Treap{ protected: struct node{ node *ch[2]; int siz,val,key; node
阅读全文
摘要:#include<vector> using namespace std; namespace Scapegoat_Tree{ #define MAXN (100000 + 10) const double alpha = 0.75; struct Node{ Node * ch[2]; int k
阅读全文
摘要:#include<bits/stdc++.h> #define val(rt) t[rt].val #define dat(rt) t[rt].dat #define cnt(rt) t[rt].cnt #define size(rt) t[rt].size #define l(rt) t[rt].
阅读全文