- 题目链接:P3372 【模板】线段树 1
- 考查知识:树状数组(区间修改/查询)
- 题意描述:模板题,按照题意进行若干次区间修改/查询即可
- 树状数组t维护区间权值为原数组差分b[i]的区间和,仅有对区间和的加操作
- 树状数组T维护i*b[i]的区间和,仅有对区间和的加操作
- 具体代码:
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=