TLE in CSUMD

please anyone explain me why am i getting tle in this code, i applied algorithm as given in editorial even then i got tle … please help!! CodeChef: Practical coding for everyone