On --RMQ problem tree line

OI in the way you have not encountered such a situation -

In one you will fight violence  so the problem will not be written on the solution of the problem: we can maintain with the tree line.

Room dalao say that this road is a segment tree template title

I do not know if you encounter anyway, I never met so often, so with this blog.

I say it on the blog post on 01 backpack Hey no one

To be recorded on this blog about my experiences learning segment tree, right -

These are good nonsense

Next, we start the topic

First, let's introduce a well-known problem - RMQ (the Range Minimum / the Maximum Query) problem

RMQ problem means that we given a sequence, every time we give a set interval, this interval inquiries smallest value of maximum /

(By dalao: we can write directly to violence)

We begin by the violence dalao to write the code below:

 

Guess you like

Origin www.cnblogs.com/dixiao/p/11291291.html