data structure problem

Правка en3, от arbcrt040, 2015-08-05 18:25:15

Greetings.

I was trying to solve one problem, but couldn't. It's like the RMQ problem but with add at position operation.

There are 2 operations:

ADD i X ---- ads X after ith element.
QUERY l r ---- RMQ of [l; r].

Can someone help me, please? Thanks in advance.

(Sorry bad English)

EDIT: Thanks everybody for help! Got accepted :)

Теги data structures, advanced data structure, segment tree, rmq

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский arbcrt040 2015-08-05 18:25:15 56 Tiny change: 'd English)' -> 'd English)\n\n**EDIT:** Thanks everybody for help! Got accepted :)'
en2 Английский arbcrt040 2015-08-05 15:00:24 10
en1 Английский arbcrt040 2015-08-05 14:59:36 327 Initial revision (published)