![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
yc0576
这个作者很懒,什么都没留下…
展开
-
树状数组
一维的情况#include using namespace std;int a[10000];//原始数据数组int c[10000];//树状数组int N;int lowbit(int n){ return n&(-n);}void modify(int n,int delta){ while(n <= N) {c[n]+=delta;n+=原创 2010-04-19 13:17:00 · 325 阅读 · 0 评论 -
poj 3468 线段树对一个区间加减和求和
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 10851 Accepted: 2550Case Time Limit: 2000MSDescriptionYou have N in原创 2010-04-20 19:55:00 · 1246 阅读 · 0 评论