Why Segment Tree implementation of "Lasers Everywhere" https://www.codechef.com/problems/LAZER giving TLE?

Hello,
I was solving the “Lasers Everywhere” LAZER Problem - CodeChef
problem with the help of a segment tree and sweep line algorithm. Here is my code in Python CodeChef: Practical coding for everyone. But it is giving TLE.
I want to know is this problem can only be solved using BIT or there is some extra calculation in my code.
Please feel free to suggest an approach using a segment tree.
Thank You.