raumdeuter's blog

By raumdeuter, history, 9 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

»
9 years ago, hide # |
 
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