fork download
  1. #include<iostream>
  2. using namespace std;
  3. #include<string.h>
  4. int main()
  5. {
  6. int t;
  7. char feedback[100000];
  8. cin>>t;
  9. while(t--)
  10. {
  11. cin>>feedback;
  12. if((strstr(feedback,"010")!=NULL) || (strstr(feedback,"101")!=NULL)) cout<<"Good\n";
  13. else cout<<"Bad\n";
  14. }
  15. return 0;
  16. }
  17.  
  18.  
Success #stdin #stdout 0s 3320KB
stdin
2
11111110
10101010101010
stdout
Bad
Good