![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树/树状数组
YZBYZZ
这个作者很懒,什么都没留下…
展开
-
poj 3468 A Simple Problem with Integers ( 线段树 )
全裸线段树。写此篇主要是太久没写线段树,贴个模板备忘。模板来自NotOnlySuccess的博客 #include <iostream>#include <cstdio>using namespace std;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const i...原创 2013-09-28 00:29:04 · 620 阅读 · 0 评论 -
hdu 1166 敌兵布阵 ( 树状数组 )
很裸的树状数组 #include <cstdio>#include <cstring>const int N=50005;int a[N],t[N];int n;inline int lowbit(int i){return i&(-i);}void update(int i,int j){ while(i<=n) {...原创 2013-09-29 18:04:09 · 666 阅读 · 0 评论