Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll 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 modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string s; cin >> s;
    char tmp = s[0]; 
    rep1(i, s.size()-1) {
        if (tmp == s[i]) {cout << "no" << endl; return;}
        tmp = s[i];
    }
    cout << "yes" << endl;
    return 0;
}
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll 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 modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string s; cin >> s;
    char tmp = s[0]; 
    rep1(i, s.size()-1) {
        if (tmp == s[i]) {cout << "no" << endl; return 0;}
        tmp = s[i];
    }
    cout << "yes" << endl;
    return 0;
}

Compiler output:
a.cc:33:16: error: stray '#' in program
   33 |     ll rtn = 1;#include <bits/stdc++.h>
      |                ^
a.cc: In function 'll factorial(ll, ll)':
a.cc:33:17: error: 'include' was not declared in this scope
   33 |     ll rtn = 1;#include <bits/stdc++.h>
      |                 ^~~~~~~
a.cc:33:26: error: 'bits' was not declared in this scope
   33 |     ll rtn = 1;#include <bits/stdc++.h>
      |                          ^~~~
a.cc:33:31: error: 'stdc' was not declared in this scope; did you mean 'std'?
   33 |     ll rtn = 1;#include <bits/stdc++.h>
      |                               ^~~~
      |                               std
a.cc:41:1: error: expected primary-expression before 'using'
   41 | using namespace std;
      | ^~~~~
a.cc:45:33: error: a function-definition is not allowed here before '{' token
   45 | constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
      |                                 ^
a.cc:46:33: error: a function-definition is not allowed here before '{' token
   46 | constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
      |                                 ^
a.cc:48:1: error: a template declaration cannot appear at block scope
   48 | template<class T> inline bool chmin(T& a, T b) {
      | ^~~~~~~~
a.cc:62:28: error: a function-definition is not allowed here before '{' token
   62 | ll factorial(ll n, ll m=2) {
      |                            ^
a.cc:71:23: error: a function-definition is not allowed here before '{' token
   71 | ll modinv(ll a, ll m) {
      |                       ^
a.cc:84:23: error: a function-definition is not allowed here before '{' token
   84 | ll modpow(ll a, ll n) {
      |                       ^
a.cc:95:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   95 | int main() {
      |         ^~
a.cc:95:9: note: remove parentheses to default-initialize a variable
   95 | int main() {
      |         ^~
      |         --
a.cc:95:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:95:12: error: a function-definition is not allowed here before '{' token
   95 | int main() {
      |            ^