摘要: 离散话和区间修改:#include #include #include #include using namespace std;const int MAXN= 100010;int t[MAXN][2],s[MAXN>1; Build(l,mid,k>1; if(rs[... 阅读全文
posted @ 2014-11-08 18:31 Scale_the_heights 阅读(124) 评论(0) 推荐(0)
摘要: 区间修改#include #include #include using namespace std;const int MAXN = 100010;struct tree{ int l,r; long long sum,lz;}a[MAXN>1; Build(l,mid,... 阅读全文
posted @ 2014-11-08 18:28 Scale_the_heights 阅读(127) 评论(0) 推荐(0)
摘要: 线段树#include #include #include #define N 32010using namespace std;struct tree{ int l,r; int sum;}a[4*N];void build(int l,int r,int k){ a[k].l=... 阅读全文
posted @ 2014-11-08 18:27 Scale_the_heights 阅读(123) 评论(0) 推荐(0)