fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int main(){
  6. // s = 10101101
  7.  
  8. int t;
  9. cin >> t;
  10. while(t--){
  11. string s;
  12. cin >> s;
  13. if(s.find("010") != string::npos || s.find("101") != string::npos){
  14. cout << "Good\n";
  15. }else{
  16. cout << "Bad\n";
  17. }
  18. }
  19. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
Standard output is empty