摘要: 1 #include 2 #include 3 const int maxn=100000+5; 4 int sum[maxn>1;31 if(Lm) update(L,R,inc,m+1,r,rt>1;44 if(lm) ret+=query(L,R,m+1,r,rt<<1|1);46 return ret;47 }48 int n,m;49 int main()50 {51 int t;52 scanf("%d",&t);53 while(t--)54 {55 scanf("%d%d",&n,&m);5 阅读全文
posted @ 2013-09-07 16:59 sooflow 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=100000+5; 6 int num[maxn>1;23 build(l,m,rt>1;35 if(x>1;46 if(Rm) return query(L,R,m+1,r,rt<<1|1);48 int a=query(L,R,l,m,rt<<1);49 int b=query(L,R,m+1,r,rt<<1|1);50 return min(a,b);51 }52 int main()53 阅读全文
posted @ 2013-09-07 16:56 sooflow 阅读(236) 评论(0) 推荐(0) 编辑