Interactive question summary

EDITORIAL:

$ 2020 to $-year $ 13 $ 1 $ month $ day open this blog

From $ NOIWC2020 $ remaining $ 17 $ day

Real-Time Strategy

In my summary of the topic in the LCT

The maximum differential

A sub-tasks:

You can continue to shrink about two endpoints to determine the best value unknown

Subtasks two:

The answer is obviously minimal in this case

$$S=\left \lfloor \frac{a[n]-a[1]}{n-1} \right \rfloor$$

So when we $ $ S block when a block length

Elements within a block does not cause the contribution of answers

So we only need to be updated answer in one operation for each block between the block

The final number of inquiries

$$Q=n+n-1+n-2$$

$ S will be rounded down with $ $ PC89pts $

Rounding up the can $ A $

Minor repairs and small buildings guess ♂ digital

For a sequence found

The most we can ask $ n-4 value $ locations

The remaining four is the most value and time value

By $ 4 $ times you can ask them divided into sets $ 2 $

For the best value we did not know Road

For the second value may know how much value can not be determined but its location

So consider maintenance $ 4 $ positions are the position of the most value and time value

While maintaining the size of the secondary value $ L, R $

Each time a location is added $ I $

From around a set of pleasing and $ i $ questioning, let the answer is x

$1>x\in[L+1,R-1]$

$ A [i] $ $ X $ must be answered directly

$2>x=L$

Then left the set of selected position must correspond to the time value, so answer it and left it by deleting the collection

After an inquiry by the collection left to another position, a position $ i $ and the right set of

Get new second smallest value

$3>x<L$

And almost not repeat the above case

Guess you like

Origin www.cnblogs.com/AthosD/p/12188971.html