TLE PROBLEM

I don’t know why there is time complexity problem for my code . here is the solution…
https://www.codechef.com/viewsolution/84005200