Help with UVA problem 11235 — RMQ

Revision en3, by Axelius, 2016-04-27 21:10:36

Hello ,

I need help with problem 11235 — RMQ of UVA
Link : — https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2176
Approach applied : I know that this question is of segment tree, and the values being in sorted order can further be used to calculate frequencies . The new frequency array should be pushed into segment tree , but after that I am lost . How would I then use the segment tree to calculate the answer , because I can't calculate answer for like (5,10) etc. Any help is appreciated !

Tags segment tree, interval tree, uva 11235

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Axelius 2016-04-27 21:10:36 122
en2 English Axelius 2016-04-27 21:05:43 10
en1 English Axelius 2016-04-27 21:04:50 512 Initial revision (published)