摘要: for (i=131072; i=1; i--) tree[i][0]=tree[i+i][0], tree[i][1]=tree[i+i+1][1]; void Down(int x) { tree[x+x][2]+=tree[x][2]; tree[x+x+1][2]+=tree[x][2]; tree[x+x][3]+=tree[x][2]* ... 阅读全文
posted @ 2017-05-01 19:41 安月冷 阅读(245) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; int tree[1048576][7],a[600005],n,m,A,B,C,i,ans,t,x; void Update(int x) { tree[x][2]=tree[x*2][2]+tree[x*2+1][2]; tree[x]... 阅读全文
posted @ 2017-05-01 19:40 安月冷 阅读(238) 评论(0) 推荐(0) 编辑