2048's blog

By 2048, 8 years ago, In English

Can any one help me. I'm trying to solve GSS1 problem on Spoj !! Using Segment Tree and I'm Getting Wrong Answer. I'm really have no idea , Here is my Code

  • Vote: I like it
  • 0
  • Vote: I do not like it

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

when you are merging , answer is not always max of left and right subtree . sometimes, you can choose some part of the Left subtree and some part of the right subtree :)