
线段树
角落里的阳光Lee
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu 4614 Vases and Flowers 多校第二场
线段树。#include #include #include #include using namespace std;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int MAXN = 50010;int num[MAXN<<2],col[MAXN<<2];void build(int l,int r,int原创 2013-07-26 08:45:05 · 1249 阅读 · 0 评论 -
【完全版】线段树
FROM:http://www.notonlysuccess.com/index.php/segment-tree-complete/在代码前先介绍一些我的线段树风格:maxn是题目给的最大区间,而节点数要开4倍,确切的来说节点数要开大于maxn的最小2x的两倍lson和rson分辨表示结点的左儿子和右儿子,由于每次传参数的时候都固定是这几个变量,所以可以用预定转载 2013-08-14 14:57:19 · 1595 阅读 · 0 评论