( RMQ 区间最值问题) 给定序列 a0,⋯,an−1, m 次询问,每次询问给定 l,r,求 max{al, …,ar}。
为了解决该问题,有一个算法叫 the Method of Four Russians ,其时间复杂度为 O(n+m) ,步骤如下:
下面解决这个 ±1 RMQ 问题,“序列”指 Euler 序列:
试补全程序。
0 of 6 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 6 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
1、①处应填( )
2、②处应填( )
3、③处应填( )
4、④处应填( )
5、⑤处应填( )
6、⑥处应填( )