- 题目链接:P2357 守墓人
- 考查知识:线段树(单点修改/查询+区间修改/查询)
- 题意描述:模板题,按照题意进行若干次四种操作
- 区间权值w为区间和,用懒标记f维护对区间权值的加操作。
- 具体代码:
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e6;<
P2357 守墓人(线段树(单点修改/查询+区间修改/查询))
于 2024-03-13 10:34:54 首次发布
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1e6;<