div24ever's blog

By div24ever, history, 6 weeks ago, In English,


I was solving CYCLCSUM from recent Codechef Cook Off. I used segment tree to solve the problem. I got accepted when I set negative infinity as -1e15 and wrong answer when it is -1e18. I am probably getting wrong answer due to overflow.

So my question what should be the value of infinity in segment tree to avoid overflow?

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