LAZER - WA (help)

I am using sweep line + segment tree to solve this. But my solution is getting WA. Can somebody help me spot the error please.

Solution : CodeChef: Practical coding for everyone

(Ignore the double macros, it was a copying error)