
线段树
文章平均质量分 77
Hermit_Inwind
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
记录一下zkw线段树
今天重新学习了一下ZKW线段树,非递归版的线段树。学完之后就是突出一个美丽新世界。 在这里用敌兵布阵测试,并记录一下方便以后复习。 #include using namespace std; const int maxn = 50005; int n, N; int arr[maxn]; int Sum[maxn<<2]; void build(int n){原创 2017-07-03 19:04:56 · 288 阅读 · 0 评论 -
HDU6070 二分 线段树
大致题意: 给定一个长度为n的序列,求size(l, r)/(r-l+1)最小,其中l,r指定区间, size(l, r)表示区间L到R中不同数的个数。 二分答案,下界为0,上界为1。对于mid我们check是否存在一组(l, r) 使size(l, r)/(r-l+1) #include #define lson node>1 #define rson node>1)+1,原创 2017-08-04 14:26:45 · 403 阅读 · 0 评论