Chef and feedback

my code is having an error in one testcase that i can’t find out. please help me kindly

#include <bits/stdc++.h>

using namespace std;

int main() {

int n;

cin>>n;

while(n--){

    string a;

    string str1="101",str2="010";

    cin>>a;

    int str=a.find(str1);

    int ps=a.find(str2),count=0;

    if (str==-1){

        if(ps==-1){

            count=1;

        }

    }

    if(count==0){

        cout<<"GOOD"<<endl;

    }

    else{

        cout<<"BAD"<<endl;

       

    }

   

}

return 0;

}

// Use this code.

#include <bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
int t;
cin>>t;
while(t–)
{
string str;
cin>>str;
int n=str.size();
int cnt=0;
for(int i=1;i<n-1;i++)
{
if((str[i-1]==‘1’ && str[i]==‘0’ && str[i+1]==‘1’)||(str[i-1]==‘0’ && str[i]==‘1’ && str[i+1]==‘0’))
{
cnt++;
}
else
{
continue;
}
}
if(cnt>0)
{
cout<<“Good”<<endl;
}
else
{
cout<<“Bad”<<endl;
}
}
return 0;
}