OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9ea4f6
)
用注解格式显示提示内容
author
Shuhao Zhang
<594422141@qq.com>
Tue, 20 Aug 2019 12:28:05 +0000
(20:28 +0800)
committer
GitHub
<noreply@github.com>
Tue, 20 Aug 2019 12:28:05 +0000
(20:28 +0800)
docs/topic/rmq.md
patch
|
blob
|
history
diff --git
a/docs/topic/rmq.md
b/docs/topic/rmq.md
index
824e75c
..
5d7c870
100644
(file)
--- a/
docs/topic/rmq.md
+++ b/
docs/topic/rmq.md
@@
-44,10
+44,12
@@
Four russian 是一个由四位俄罗斯籍的计算机科学家提出来的基
当然询问由于要跑三个 ST 表,该实现方法的时间复杂度较大。
-> 一些小小的算法改进
-> 我们发现,在询问的两个端点在数组 A 中属于不同的块的时候,数组 A 中块内的询问是关于每一块前缀或者后缀的询问。
-> 显然这些询问可以通过预处理答案在 $O(n)$ 的时间复杂度内被解决。
-> 这样子我们只需要在询问的时候进行至多一次 ST 表上的查询操作了。
+!!! note "一些小小的算法改进"
+ 我们发现,在询问的两个端点在数组 A 中属于不同的块的时候,数组 A 中块内的询问是关于每一块前缀或者后缀的询问。
+
+ 显然这些询问可以通过预处理答案在 $O(n)$ 的时间复杂度内被解决。
+
+ 这样子我们只需要在询问的时候进行至多一次 ST 表上的查询操作了。
## 笛卡尔树以及其构造