lahm07's blog

By lahm07, history, 8 years ago, In English

Hello everyone, I was trying to solve this problem using segment tree.My code is giving runtime(SIGSEGV) error.I tried my best but I think I need your help.Can anyone please explain me where I am going wrong. Thank You:)

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

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

I think your lazy propagation is the reason of the segmentation fault. Propagating the leafs of the tree is unnecessary and too risky

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

    Thank You, That was the error...got the AC.