Needed help in this problem Problem Code : SHIT

This solution is not even passing pretests still it’s getting AC. If there is anything I’m missing in this question https://www.codechef.com/problems/SHIT or there were problem is testing process.

Solution link https://www.codechef.com/viewsolution/27431316