数据结构
whw0821
OI蒟蒻
展开
-
线段树初步
最基本的线段树:支持区间加,区间查询,带懒标记。例题:codevs1082 线段树练习3 题意不再赘述。代码:#include<iostream> #include<cstdio> using namespace std; const int maxn=2e5+10; inline int getint() { int x=0,f=1;char c=getchar(); while原创 2016-11-15 17:03:19 · 238 阅读 · 0 评论 -
线段树初步
最基本的线段树:支持区间加,区间查询,带懒标记。例题:codevs1082 线段树练习3 题意不再赘述。代码:#include<iostream> #include<cstdio> using namespace std; const int maxn=2e5+10; inline int getint() { int x=0,f=1;char c=getchar(); while原创 2016-11-15 17:04:16 · 180 阅读 · 0 评论