Error of exceeding timelimit

here is the link to my code:-https://ide.codingblocks.com/s/660297
please rectify my code