I think the problem is in this line (at least at this contest):
if(t==567) cout<<"yayayayayyaya"<<'\n';
I think the problem is in this line (at least at this contest):