参考:https://blog.csdn.net/qq_31411163/article/details/96345031 题意:给定n个空串,2种操作。把l r上的数前后都加上x;查询l r上数之和。 题解:维护sum1 sum2,以及左右标记和长度标记。维护过程详见代码。
#include
using namespace std;
#define ll long long
#define lson rt
关注
打赏
热门博文