WA in EATTWICE

Please tell me what is wrong in my code.
https://www.codechef.com/viewsolution/32143969