Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <bits/stdc++.h>
- using namespace std ;
- typedef long long ll ;
- int main() {
- ios_base::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nullptr) ;
- int t ;
- string s ;
- cin >> t ;
- while (t--) {
- cin >> s ;
- for (int i = 0; i < s.size(); i++) {
- if (s[i] != s[i + 1] && s[i] == s[i + 2]) {
- cout << "Good" << "\n" ; break ;
- } else {
- cout << "Bad" << "\n" ;
- break ;
- }
- }
- }
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment