![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
苯上的甲基
仅供自学使用,出了事情概不负责xD
展开
-
线段树进阶 区间取模
CF 438D - The Child and Sequence题目要求的操作:1 区间求和2 区间取模3 单点修改这道题目不要用到 lazy数组,因为条件是单点修改,直接修改的叶子节点,其次区间取模操作直接可以暴力。 下面来分析为什么区间的取模操作为什么可以直接对区间里所有的叶子节点暴力修改...原创 2019-07-25 14:58:33 · 1602 阅读 · 0 评论 -
poj 3468 经典线段树
只要加一个lazy就行了,注意的是update和query里的return条件。只要当前区间包含于查询区间就可以直接返回了。当时没注意,只在query里设置了,update里没用lazy(汗#include <queue>#include <cstdio>#include <set>#include <string>#includ...原创 2019-07-23 15:47:34 · 71 阅读 · 0 评论 -
hdu 2795
At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements are posted: nearest p...原创 2019-08-07 22:47:46 · 73 阅读 · 0 评论 -
hdu 4902 线段树
There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people. Now he is just like...原创 2019-08-19 10:38:28 · 153 阅读 · 0 评论