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.<br></br>↵
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 :)
↵
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.<br></br>↵
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 :)