1.lowbite :i&-i;
2.c[i]=x[i-lowbite(i)+1]+x[i-lowbite(i)+2]+x[i-lowbite(i)+3]+.....+x[i];
3.for(int i=k;i>=0;i-=lowbite(i)) sum[k]+=c[i];
4.点修改:for(int i=k;i<=n;i+=lowbite(i)) c[i]+=d;
5.区间修改:加上差分数组;
代码完善中
1.lowbite :i&-i;
2.c[i]=x[i-lowbite(i)+1]+x[i-lowbite(i)+2]+x[i-lowbite(i)+3]+.....+x[i];
3.for(int i=k;i>=0;i-=lowbite(i)) sum[k]+=c[i];
4.点修改:for(int i=k;i<=n;i+=lowbite(i)) c[i]+=d;
5.区间修改:加上差分数组;
代码完善中