WA in SWPDGT

For which case is my code giving incorrect answer?

https://www.codechef.com/viewsolution/30851623