您当前的位置: 首页 > 

HDU 6562 Lovers(线段树)

对方正在debug 发布时间:2019-11-11 11:40:37 ,浏览量:7

参考: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            
关注
打赏
1688896170
查看更多评论
0.1407s