摘要: //本题主要运用了树组数组的知识,学了后就会做了#include#includeconst int N=1000010;int n,c[N];//该函数功能是求出n二进制中最右边0的个数的2次幂,也等于c[n]包含的元素个数num[n-lowbit(n)+1]+...+num[n]int lowbi... 阅读全文
posted @ 2012-12-28 22:04 YaLing 阅读(182) 评论(0) 推荐(0)
摘要: #includeint c[1000010];int main(){// freopen("in.txt","r",stdin); int M,N,a,b; scanf("%d%d",&M,&N); c[0]=0; for(int i=1;i<=M;i++) { scanf("%d",&c[i])... 阅读全文
posted @ 2012-12-28 19:06 YaLing 阅读(154) 评论(0) 推荐(0)