摘要: Splay 的属性 1 struct Splay{2 int rt, cnt;3 int ch[N][2], pre[N], sz[N];4 LL sum[N], add[N], val[N];5 }Splay 的操作主要集中在 1. Rotate( x, d ) 旋转分为 左旋(d=0), 右旋(d=1) 2. Splay( x, goal ) 将节点x 旋转到 节点goal下 3. Rotate_To( k, goal ) 将左数第k个节点旋转到 节点goal 下 1 void rotate(int x,int d){ 2 int y = ... 阅读全文
posted @ 2013-04-17 12:59 yefeng1627 阅读(193) 评论(0) 推荐(0) 编辑

Launch CodeCogs Equation Editor