随笔分类 -  数据结构-平衡树

摘要:splay 阅读全文
posted @ 2019-07-24 15:19 整理者 阅读(299) 评论(0) 推荐(0) 编辑
摘要:```cpp include define inf 2147483647 using namespace std; const int N=100010; int ch[N][2],val[N],key[N],sz[N],tot; struct FHQtreap{ int rt,x,y,z; inl 阅读全文
posted @ 2019-07-24 15:18 整理者 阅读(206) 评论(0) 推荐(0) 编辑
摘要:```cpp #include using namespace std; const int N=100010; int root,tot; int sz[N],val[N],ch[N][2],fa[N]; void pushup(int x){ if(!x)return; sz[x]=1; if(ch[x][0])sz[x]+=sz[ch[x][0]],fa[ch[x][0]]=x;... 阅读全文
posted @ 2019-07-22 21:04 整理者 阅读(185) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示