dush1729's blog

By dush1729, history, 5 years ago, In English

Hi,

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