fork download
  1. #include <bits/stdc++.h>
  2. #include<algorithm>
  3. using namespace std;
  4. int main(){
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);
  7. cout.tie(0);
  8.  
  9.  
  10.  
  11. int n;
  12. cin>>n;
  13. string s[n];
  14.  
  15. for(int i=0;i<n;i++){cin>>s[i];
  16. if(s[i].find("010")||s[i].find("101")){cout<<"Good"<<'\n';}
  17. else {cout<<"Bad"<<'\n';}}
  18. }
Success #stdin #stdout 0.01s 5348KB
stdin
1
111111111
stdout
Good