标签:amp sum 树状 fine ++ space div bit turn
1 #include<bits/stdc++.h> 2 #define main mian 3 using namespace std; 4 void add(int x,int v){ 5 for(; x<=n;x+=x &-x) sum[x]+=v; 6 } 7 int ask(int k){ 8 int ans=0; 9 for(;x;x-=x%-x) ans+=sum[x]; 10 return ans; 11 } 12 int mian(){ 13 14 return 0; 15 }
标签:amp sum 树状 fine ++ space div bit turn
原文地址:https://www.cnblogs.com/luv-letters/p/9606523.html