摘要: 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=1166代码如下:using namespace std ;typedef long long LL;const int Max_N=50010;int cc[Max_N]; // 树状数组,有ci = A(i-lowbit(i)+1) + A(i-lowbit(i)+2)+ Aiint n;// 数组A的个数,下标从1开始int lowbit(int x){//lowbit 求的是 x的二进制表达式中最右边的1所对应的值 return x & -x;}void Add(int x, int 阅读全文