![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
平衡树
文章平均质量分 81
BryantMark
这个作者很懒,什么都没留下…
展开
-
hdu 3726 Graph and Queries
#include#include#include#include#define L ch[rt][0]#define R ch[rt][1]const int N = 411111;const int maxn = 111111;int ch[maxn][2], aux[maxn], num[maxn], size[maxn], cnt[maxn];int No原创 2013-05-09 18:29:07 · 755 阅读 · 0 评论 -
poj 3017
单调队列优化 单调队列 维护 最大值 队列首元素对应的DP 值 为 dp[low-1] + a[q[front]] 其余元素对应的值(设该元素为q[k]) dp[q[k-1]]+a[q[k]]; Treap 维护下最小值就行了。 #include#include#include#include#include#include#include#include#原创 2013-07-03 22:10:43 · 437 阅读 · 0 评论 -
bzoj 1251 简单伸展树
基本操作 翻转 成段加上一个数 求区间最值#include#include#include#include#include#include#include#include#includeusing namespace std;#define L p->ch[0]#define R p->ch[1]#define KeyTree root->ch[1]->ch[0]原创 2013-10-29 19:09:23 · 637 阅读 · 0 评论