![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
oshawott_cute
这个作者很懒,什么都没留下…
展开
-
路径交
#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>using namespace std; typedef pair<int,int> P;typedef long long ll;const int INF=1e9;const int...原创 2019-05-24 23:40:24 · 196 阅读 · 0 评论 -
i hate it(单点修改,区间查询)
#include<bits/stdc++.h>using namespace std;#define maxn 4000005int root[maxn];void pushup(int x){ root[x]=max(root[x<<1],root[x<<1|1]);}void build(int x,int l,int r){ if (...原创 2019-05-22 22:07:36 · 128 阅读 · 0 评论 -
敌兵布阵
#include<cstdio>#include<cstring>using namespace std;#define maxn 50001//int c[maxn]; int a[4*maxn];int sum[4*maxn];void build(int rt,int l,int r){ if (l==r) { sum[rt]=a[l]...原创 2019-05-23 20:52:30 · 64 阅读 · 0 评论