WA in MULTHREE

My code is throwing wrong answer.
https://www.codechef.com/viewsolution/31874028