Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

_QWOiNYUIVMPFSBKLiGSMAP_'s blog

By _QWOiNYUIVMPFSBKLiGSMAP_, history, 3 years ago, In English,

any suggest to solve this problem using rmq(segment tree) http://codeforces.com/contest/71/problem/D

 
 
 
 
  • Vote: I like it
  • -8
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I remembered that I solved this problem in a very straightforward manner, with quite long codes. Well, it is a little difficult for me to relate this problem with RMQ....

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it may need 2d segment tree

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Now I understand why I can not establish the relationship between segment tree and that problem....

      If you figure out how to solve it based on 2D segment tree, it is really nice for you to share some materials or discussion about it. I think 2D segment tree is really an advanced technique, at least for me.