p;ease guide me what the problem with code

this code generate correct output on all cases that i can think but spoj results “wrong answer”
please help me how can i resolve this problem

problem code :ERROR Practise|easy
my code:#include

#include<string>
using namespace std;
int main()
{
int T;
cin>>T;
if(T>100||T<1)
return 0;
while(T--)
{
string s;
cin>>s;
int l=s.length();
int i=0;
for(;i<(l-2);i++)
{
if(s[i]!='0'&&s[i]!='1')
return 0;
if(((s[i]=='0')&&(s[i+1]=='1')&&(s[i+2]=='0'))||((s[i]=='1')&&(s[i+1]=='0')&&(s[i+2]=='1')))
{cout<<"Good"<<endl;
break;
}
}
if(i==l-2)
cout<<"Bad"<<endl;
}
return 0;
}

format your code yogi…use the option with a pic of binaries or just edit your question and type < code >(no spaces) at start of your code.

This will help u

Does your code even compile?