摘要: 网上资源很多,百度一下你就知道代码:#include#include#define N 1000010int c[N],a[N];int n = 0;int l(int i){ return i&(-i);}void change(int i,int m){ int j; for(j = i; j 0) { s+=c[i]; i -= l(i); } return s;}int main(){ int m; scanf("%d%d",&n,&m); memset(c,0,sizeof(c)); int i; for(i =1 ; i <= n; 阅读全文
posted @ 2012-11-21 21:20 heity 阅读(776) 评论(0) 推荐(0) 编辑