平衡树(Treap)
文章平均质量分 81
墨温温
呆萌理工女~ ~
展开
-
POJ 1442(treap || 优先队列)
treap套用模板即可:原创 2015-08-18 00:07:06 · 910 阅读 · 0 评论 -
POJ 2761(求区间第k小值)
Feed the dogsTime Limit: 6000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uSubmitStatus DescriptionWind loves pretty dogs very much, and she has n pe原创 2015-08-20 16:43:21 · 946 阅读 · 0 评论 -
Treap 模板
int ch[maxn][2],val[maxn],counts[maxn],r[maxn],size[maxn],root,tot;void newnode(int &rt,int v){ rt = ++tot; val[rt] = v; ch[rt][0] = ch[rt][1] = 0; size[rt] = counts[rt] = 1; r[原创 2015-08-17 12:16:26 · 467 阅读 · 0 评论