Language: C++

//
//  main.cpp
//  競技20190629

#include <iostream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include <regex>
#include <map>
#include <set>
using namespace std;
#define ll long long int
#define FOR(i,min,max) for(int i=(min);i<(max);i++)
#define FOReq(i,min,max) for(int i=(min);i<=(max);i++)
#define FORREV(i,max,min) for(int i=(max)-1;i>=(min);i--)
const int  MOD=1000000007;
const int  INF=2000000000;
const double  Micro=1e-5;

int noterror(){
    if(INF || Micro || MOD){;}
    return 0;
}

#define pf printf
#define sf scanf
#define in(x) {cin >> (x);}
#define inarray(array,min,max) FOR(i,min,max){in(array[i]);}
#define inarrayW(arrayA,arrayB,min,max) FOR(i,min,max){in(arrayA[i]);in(arrayB[i]);}


inline int isEven(int x){return x%2==0;}
inline int isOdd (int x){return x%2==1;}

int br(){
    printf("\n");
    return 0;
}
ll combi(int n, int k) {
    if (n == k || k == 0 )
        return 1;
    else {
        return combi(n - 1, k - 1) + combi(n - 1, k);
    }
}
ll modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
ll combi2(ll n,ll k,ll m){
    ll ans=1;
    for(ll i=0;i<k;i++){
        ans=(ans*(n-i))%m;
        ans=(ans*modinv(i+1,m))%m;
    }
    return ans;
}

int gcd(int a,int b){//最大公約数
    if(b==0){
        return a;
    }else{
        return gcd(b,a%b);
    }
}

int seiki()//正規表現
{
    string S;
    cin >> S;
    
    regex re("[dream|dreamer|erase|eraser]*");
    
    if(regex_match(S,re)){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
        
    }
    return 0;
}



//sort(a,a+100,greater<int>());大きい順
//sort(a,a+100);小さい順
/*
 int N;
 cin >> N;
 vector<int> d(N);
 int i = 0;
 int n = N;
 while(n--){
 cin >> d[i];
 i++;
 }
 
 sort(d.begin(),d.end());
 d.erase( unique(d.begin(),d.end()), d.end());隣り合った重複を削除し、消した分要素数を詰める
 cout<<d.size()<<endl;
 return 0;
*/
/*
 ペアの使い方
 vector<pair<long long,long long>> arr(N);
 for(int i=0;i<N;i++){
 cin >> arr[i].first >> arr[i].second;
 }
 sort(arr.begin(),arr.end());
 */
/*
int X(){ //stringの偶数文字目だけ出力
    string s;
    cin >> s;
    size_t size = s.length();
    
    string ans;
    
    for(int i=0;i<size;i++){
        if(i%2==0){
            ans = ans+s[i];
            
        }
    }
    cout << ans << endl;
    
    return 0;
}



*/
struct SimpleUnionFind {
    vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2
    
    SimpleUnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
        for(int i = 0; i < N; i++) par[i] = i;
    }
    
    int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
        if (par[x] == x) return x;
        return par[x] = root(par[x]);
    }
    
    void unite(int x, int y) { // xとyの木を併合
        int rx = root(x); //xの根をrx
        int ry = root(y); //yの根をry
        if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
        par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
    }
    
    bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
};
int UniFiExample() { // https://abc097.contest.atcoder.jp/tasks/arc097_b
    int N, M;
    cin >> N >> M;
    vector<int> P(N);
    for(int i = 0; i < N; i++){
        cin >> P[i];
    }
    
    SimpleUnionFind tree(N);//木を初期化
    
    for(int i = 0; i < M; i++) {
        int x, y;
        cin >> x >> y;
        tree.unite(x-1, y-1); // x-1の木とy-1の木を併合する
    }
    
    int count = 0;
    for(int i = 0; i < N; i++) {
        if (tree.same(i, P[i]-1)) { //iとP[i]-1が同じ木に属するなら，カウンタに1追加
            count++;
        }
    }
    cout << count << endl;
    return 0;
}

struct RankedUnionFind {
    vector<int> par; // 親ノード
    vector<int> rank; // ランク
    
    RankedUnionFind(int n = 1) {
        init(n);
    }
    
    void init(int n = 1) {
        par.resize(n); rank.resize(n);
        for (int i = 0; i < n; ++i) {par[i] = i; rank[i] = 0;}
    }
    
    int root(int x) {
        if (par[x] == x) {
            return x;
        }
        else {
            int r = root(par[x]);
            return par[x] = r;// = は一つ
        }
    }
    
    bool issame(int x, int y) {
        return root(x) == root(y);
    }
    
    bool merge(int x, int y) {
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y);
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        return true;
    }
};

template<class Abel> struct WeightUnionFind {
    vector<int> par;
    vector<int> rank;
    vector<Abel> diff_weight;
    
    WeightUnionFind(int n = 1, Abel SUM_UNITY = 0) {
        init(n, SUM_UNITY);
    }
    
    void init(int n = 1, Abel SUM_UNITY = 0) {
        par.resize(n); rank.resize(n); diff_weight.resize(n);
        for (int i = 0; i < n; ++i) par[i] = i, rank[i] = 0, diff_weight[i] = SUM_UNITY;
    }
    
    int root(int x) {
        if (par[x] == x) {
            return x;
        }
        else {
            int r = root(par[x]);
            diff_weight[x] += diff_weight[par[x]];
            return par[x] = r;
        }
    }
    
    Abel weight(int x) {
        root(x);
        return diff_weight[x];
    }
    
    bool issame(int x, int y) {
        return root(x) == root(y);
    }
    
    bool merge(int x, int y, Abel w) {
        w += weight(x); w -= weight(y);
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y), w = -w;
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        diff_weight[y] = w;
        return true;
    }
    
    Abel diff(int x, int y) {
        return weight(y) - weight(x);
    }
};

// https://qiita.com/drken/items/cce6fc5c579051e64fab
// https://beta.atcoder.jp/contests/abc087/tasks/arc090_b
int WeightUniFiExample() {
    int N, M;
    cin >> N >> M;
    WeightUnionFind<int> uf(N);
    for (int i = 0; i < M; ++i) {
        int l, r, d;
        cin >> l >> r >> d;
        --l; --r;
        if (uf.issame(l, r)) {
            int diff = uf.diff(l, r);
            if (diff != d) {
                cout << "No" << endl;
                return 0;
            }
        }
        else {
            uf.merge(l, r, d);
        }
    }
    cout << "Yes" << endl;
    return 0;
}
/*
int WeightUniFiExample2() {
    int N;
    while (cin >> N) {
        if (N == 0) break;
        bool ok = true;
        WeightUnionFind<int> uf(200); // 単位個数は最悪で 200 個
        map<string,int> str2id; // 単位 -> id の対応
        int final_id = 0;
        for (int i = 0; i < N; ++i) {
            string ichi, unit1, equal, val, unit2;
            cin >> ichi >> unit1 >> equal >> val >> unit2;
            
            // 1個目の単位の番号
            if (!str2id.count(unit1)) {
                str2id[unit1] = final_id++;
            }
            int id1 = str2id[unit1];
            
            // 2個目の単位の番号
            if (!str2id.count(unit2)) {
                str2id[unit2] = final_id++;
            }
            int id2 = str2id[unit2];
            
            // 単位換算の倍率の取得
            stringstream si(val.substr(3));
            int diff;
            si >> diff; // "1 kilometre = 10^3 metre" の 3 の部分を取得
            
            // 重み付き Union-Find 木の処理
            if (uf.issame(id1, id2)) {
                int curdiff = uf.diff(id1, id2);
                if (diff != curdiff) ok = false;
            }
            else {
                uf.merge(id1, id2, diff);
            }
        }
        
        if (ok) puts("Yes");
        else puts("No");
    }
}
*/



int nap(){//ナップサック問題
    int N,W;
    in(N);in(W);
    int v[N],Weight[N];
    inarrayW(v, Weight, 0, N)
    int DP[N+1][W+1];
    FOR(i, 0, W+1){DP[0][i]=0;}

    FOR(i,0, N){//i番目までの品物で
        FOR(w,0,W+1){//重さがW以下
            if(w<Weight[i]){DP[i+1][w]=DP[i][w];}
            else {DP[i+1][w]=max(DP[i][w],DP[i][ w-Weight[i] ]+v[i]);}
        }
    }
    FOR(i, 0, N+1){
        FOR(w,0,W+1){
            pf("%d,",DP[i][w]);
        }
        br();
    }

    pf("%d\n",DP[N][W]);
    return 0;
}





int isSquare(ll X){
    ll a;
    a = (ll)sqrt((double)X); /* Nの平方根を求めint型に格納することで小数部分を捨てる。 */
    if (a*a == X) {return 1;}
    else return 0;
}
inline ll Cube(ll X){return X*X*X;}
    
int isCubic(ll X){//0は立方数に含む。負の数も含む。
    abs(X);
    if(X==0 or X==1)return 1;
    ll min=1,max=X,mid=-1;
    
    while(min<max){
        mid=(min+max)/2;
        if(Cube(mid)<X){min=mid+1;continue;}
        if(Cube(mid)>X){max=mid-1;continue;}
        return 1;
    }
    
    return Cube(mid)==X;
}

ll printintN(ll array[],const int num){
    for(int i=0;i<num;i++){printf("%lld ",array[i]);}
    br();
    return 0;
}
int AllElementChange0(int array[],const int num){
    for(int i=0;i<num;i++){array[i]=0;}
    return 0;
}

//#define int long long int

/*
 1.困った時こそ冷静に問題文を見直す！制約条件を見ろ！乱択アルゴリズムとかO(N^3)とか！
 2.一度に大量のことをやろうとしない
 3.プログラミングは半分数学だが、もう半分は数学ではない
 
 */




int DpMiss(){
    int N;
    in(N);
    ll A[N+1];A[0]=0;
    inarray(A, 1, N+1);
    
    pf("A is ");
    printintN(A, N+1);
    int halfN=(N-1)/2;
    ll evensum2rev[halfN+2],oddsum2rev[halfN +3];
    
    //#define FORREV(i,max,min) for(int i=(max)-1;i>=(min);i--)
    evensum2rev[halfN]=2*A[N-1];evensum2rev[halfN+1]=0;
    FORREV(i,halfN,0){
        evensum2rev[i]=evensum2rev[i+1]+(2*A[2*i]);
    }
    pf("vensum2rev ");
    printintN(evensum2rev, halfN+2);
    
    
    oddsum2rev[halfN+1]=2*A[N];oddsum2rev[halfN+2]=0;oddsum2rev[0]=0;
    FORREV(i,halfN+1,1){
        oddsum2rev[i]=oddsum2rev[i+1]+2*A[2*i -1];
    }
    pf("oddsum2rev ");
    printintN(oddsum2rev, halfN+3);
    
    ll evensum2[halfN+1],oddsum2[halfN +2];
    
    //#define FORREV(i,max,min) for(int i=(max)-1;i>=(min);i--)
    evensum2[1]=2*A[2];evensum2[0]=0;
    FOR(i,2,halfN+1){
        evensum2[i]=evensum2[i-1]+2*A[2*i];
    }
    oddsum2[1]=2*A[1];oddsum2[0]=0;
    FOR(i,2,halfN+2){
        oddsum2[i]=oddsum2[i-1]+2*A[2*i -1];
    }
    
    pf("evebsum2    ");
    printintN(evensum2, halfN+1);
    pf("oddsum2     ");
    printintN(oddsum2, halfN+2);
    
    ll sum2=oddsum2[halfN+1]+evensum2[halfN];
    
    pf("%lld \n",sum2);
    
    int half;
    FOR(i, 1, N+1){
        half=i/2;
        if(i==1){pf("%lld ",sum2-evensum2rev[1]);}
        else if(i%2==1){pf("%lld ",sum2-evensum2rev[half+1]- oddsum2[half-1]);}
        else if(i%2==0){pf("%lld ",sum2- oddsum2rev[half+1]-evensum2[half-1]);}
    }
    br();
    
    return 0;
}
int Dp(){
    int N;
    in(N);
    ll A[N+1];A[0]=0;
    inarray(A, 1, N+1);
    ll sum=0;
    FOR(i, 1, N+1){sum+=A[i];}
    pf(" sum= %lld \n",sum);
    ll ans[N+1];ans[0]=0;
    
    ans[1]=sum;
    FOR(i, 1, N+1){
        if((1<i)&&(i%2==1))sum-=A[i];
    }
    
    
    return 0;
}

int tekitou(){
    string s;
    in(s);
    if(s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[3]){pf("Good\n");}
    else{pf("Bad\n");}
    return 0;
}

signed main(){
    assert(1);
    tekitou();
    //Ap();
    //Bp();
    //Cp();
    //Dp();
    //Ep();
    //Fp();
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:515:5: error: 'assert' was not declared in this scope
  515 |     assert(1);
      |     ^~~~~~
a.cc:15:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   14 | #include <set>
  +++ |+#include <cassert>
   15 | using namespace std;