最近学习了好久的线段树,对线段树有了初步的基础的认知,为了巩固知识点找几道基础题练练手![laugh.gif](https://static-blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
转存失败重新上传取消![大笑](https://static-blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
1.hdu1166 敌兵布阵
http://acm.hdu.edu.cn/showproblem.php?pid=1166
思路:线段树基础模版题(点修改+区间查询)
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
const int maxn=50009;
ll a[