Giving runtime error

CodeChef: Practical coding for everyone can anyone tell me where my code going wrong.

By changing some lines of code i got TLE(CodeChef: Practical coding for everyone) line number 4 and 51 is changed you can check my AC submission CodeChef: Practical coding for everyone(for reference) \

after using array to I am still getting runtime error
https://www.codechef.com/viewsolution/40921270

CodeChef: Practical coding for everyone your AC code line number 4 and 50 is changed i changed 10e5 to 1e5 and if(ss>=qs&&se<=qe) is changed on line 50

thanks I got it now.