SSO - Editorial

Can someone tell my why my solution is failing for subtask 0?
https://www.codechef.com/viewsolution/43587242
Thanks.