摘要:
http://poj.org/problem?id=3468题意:就是区间的查询与更新。。#include #include const int maxn=100010;const int maxm=6600000;#define LL long longstruct node{ int a,b; int l,r; LL sum; LL h;} A[maxm];int Num[maxn],cnt;void build(int root){ int a = A[root].a; int b = A[root].b; int mid = (a+b)>>... 阅读全文
posted @ 2014-02-10 19:51
N_ll
阅读(129)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=2892题意:输入n,m。n代表数轴的长度,m代表操作数。 D x: 摧毁点x Q x: 询问村庄x最左与最右没有被摧毁的点的距离R :恢复最后一个被摧毁的点 1 #include 2 #include 3 const int N=50001; 4 int c[N],keep[N],n; 5 bool vis[N]; 6 7 int lowbit(int x) 8 { 9 return x&(-x);10 }11 int sum(int x)12 {13 int res = 0;14 while(x > 0)15... 阅读全文
posted @ 2014-02-10 10:33
N_ll
阅读(304)
评论(0)
推荐(0)

浙公网安备 33010602011771号