POJ - 3468 A Simple Problem with Integers(树状数组,区间修改,区间查询)
POJ - 3468 A Simple Problem with Integers#include<iostream>#include<cstdio> using namespace std;typedef long long ll; const int N = 1e6+10;ll sum1[N],sum2[N],a[N];int n,m;int lowbit(int x){ return (x&-x);}void updata(ll x,ll y)