help solving practice test - ANTMAT

Hi,

This is my solution
https://www.codechef.com/viewsolution/22760464

I did try to peek into other submissions. However i am tryng it to solve in my way. Unable to get it why its wrong.
can anyone tell me whats wrong in my solution.

Thanks