摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1166树状数组模板题 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int N=50005; 7 int a[N],c[N]; 8 int n; 9 int lowbit(int x)10 {11 return x&(-x);12 }13 int sum(int x)14 {15 int ans = 0;16 while(x > 0)17 {18 an... 阅读全文
posted @ 2014-01-17 09:55 N_ll 阅读(121) 评论(0) 推荐(0)