![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
Eminem1147
NJU SE Master
展开
-
线段树的学习
以下内容来自转载:一:线段树基本概念1:概述线段树,类似区间树,是一个完全二叉树,它在各个节点保存一条线段(数组中的一段子数组),主要用于高效解决连续区间的动态查询问题,由于二叉结构的特性,它基本能保持每个操作的复杂度为O(lgN)!性质:父亲的区间是[a,b],(c=(a+b)/2)左儿子的区间是[a,c],右儿子的区间是[c+1,b],线段树需要的空间为数组大小转载 2016-03-20 19:18:26 · 290 阅读 · 0 评论 -
经典问题:不断更新查找区间连续递增序列(区间合并模板+单点更新)(3308)
LCISTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6068 Accepted Submission(s): 2635Problem DescriptionGiven n integers.You ha原创 2016-04-02 17:35:49 · 495 阅读 · 0 评论 -
线段树维护区间和模板(单结点更新)(1166)
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 67960 Accepted Submission(s): 28578Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以原创 2016-03-23 20:25:36 · 310 阅读 · 0 评论 -
线段树维护区间最大模板(单结点更新)(1754)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 58039 Accepted Submission(s): 22643Problem Description很多学校流行一种比较的习惯。老师们很原创 2016-03-23 22:01:27 · 250 阅读 · 0 评论 -
用线段树解决逆序数问题(1394)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16195 Accepted Submission(s): 9851Problem DescriptionThe原创 2016-03-24 14:47:52 · 270 阅读 · 0 评论 -
深入理解线段树运作流程(2795)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17263 Accepted Submission(s): 7294Problem DescriptionAt the entrance to原创 2016-03-24 16:00:26 · 229 阅读 · 0 评论 -
线段树区间更新模板(lazy延迟标记)(1698)
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25491 Accepted Submission(s): 12725Problem DescriptionIn the game of D原创 2016-04-01 21:23:31 · 319 阅读 · 0 评论