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)