I was solving the “Lasers Everywhere” https://www.codechef.com/problems/LAZER
problem with the help of a segment tree and sweep line algorithm. Here is my code in Python https://www.codechef.com/viewsolution/33085639. 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.
Why Segment Tree implementation of "Lasers Everywhere" https://www.codechef.com/problems/LAZER giving TLE?