Segment Tree Problem - UEFA Champions League (HELP)

I am trying to solve this segment tree based problem UCL1 Problem - CodeChef
and am getting TLE , i have seen the editorial and my code is pretty much same, can anyone please help me find out the error in my code .

https://www.codechef.com/viewsolution/34349252