Chef y retroalimentación de la solución CODECHEF en CPP
#include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
string s;
cin >> s;
int cnt = 0;
for (int j = 0; j < s.length(); j++)
{
if (s[j] == '0' && s[j + 1] == '1' && s[j + 2] == '0')
cnt++;
else if (s[j] == '1' && s[j + 1] == '0' && s[j + 2] == '1')
cnt++;
}
if (cnt >= 1)
cout << "Good\n";
else
cout << "Bad\n";
}
return 0;
}
coder