Language: C++

struct mint {
  ll x;
  mint(ll x=0):x((x%MOD+MOD)%MOD){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += MOD-a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }
  mint& operator/=(const mint r) {
    ll a = r.x, b = MOD, u = 1, v = 0;
    while (b) {
      ll t = a / b;
      a -= t * b; swap(a, b);
      u -= t * v; swap(u, v);
    }
    x = x * u % MOD;
    if (x < 0) x += MOD;
    return *this;
  }
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

Compiler output:
a.cc:2:3: error: 'll' does not name a type
    2 |   ll x;
      |   ^~
a.cc:3:10: error: expected ')' before 'x'
    3 |   mint(ll x=0):x((x%MOD+MOD)%MOD){}
      |       ~  ^~
      |          )
a.cc:17:12: error: 'll' has not been declared
   17 |   mint pow(ll t) const {
      |            ^~
a.cc: In member function 'mint mint::operator-() const':
a.cc:4:41: error: 'x' was not declared in this scope
    4 |   mint operator-() const { return mint(-x);}
      |                                         ^
a.cc: In member function 'mint& mint::operator+=(mint)':
a.cc:6:10: error: 'x' was not declared in this scope
    6 |     if ((x += a.x) >= MOD) x -= MOD;
      |          ^
a.cc:6:17: error: 'const struct mint' has no member named 'x'
    6 |     if ((x += a.x) >= MOD) x -= MOD;
      |                 ^
a.cc:6:23: error: 'MOD' was not declared in this scope
    6 |     if ((x += a.x) >= MOD) x -= MOD;
      |                       ^~~
a.cc: In member function 'mint& mint::operator-=(mint)':
a.cc:10:10: error: 'x' was not declared in this scope
   10 |     if ((x += MOD-a.x) >= MOD) x -= MOD;
      |          ^
a.cc:10:15: error: 'MOD' was not declared in this scope
   10 |     if ((x += MOD-a.x) >= MOD) x -= MOD;
      |               ^~~
a.cc:10:21: error: 'const struct mint' has no member named 'x'
   10 |     if ((x += MOD-a.x) >= MOD) x -= MOD;
      |                     ^
a.cc: In member function 'mint& mint::operator*=(mint)':
a.cc:13:37: error: 'x' was not declared in this scope
   13 |   mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
      |                                     ^
a.cc:13:44: error: 'const struct mint' has no member named 'x'
   13 |   mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
      |                                            ^
a.cc:13:50: error: 'MOD' was not declared in this scope
   13 |   mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
      |                                                  ^~~
a.cc: In member function 'mint mint::pow(int) const':
a.cc:18:20: error: could not convert '1' from 'int' to 'mint'
   18 |     if (!t) return 1;
      |                    ^
      |                    |
      |                    int
a.cc: In member function 'mint& mint::operator/=(mint)':
a.cc:25:5: error: 'll' was not declared in this scope
   25 |     ll a = r.x, b = MOD, u = 1, v = 0;
      |     ^~
a.cc:26:12: error: 'b' was not declared in this scope
   26 |     while (b) {
      |            ^
a.cc:27:10: error: expected ';' before 't'
   27 |       ll t = a / b;
      |          ^
a.cc:28:7: error: 'a' was not declared in this scope
   28 |       a -= t * b; swap(a, b);
      |       ^
a.cc:28:12: error: 't' was not declared in this scope
   28 |       a -= t * b; swap(a, b);
      |            ^
a.cc:28:19: error: 'swap' was not declared in this scope
   28 |       a -= t * b; swap(a, b);
      |                   ^~~~
a.cc:29:7: error: 'u' was not declared in this scope
   29 |       u -= t * v; swap(u, v);
      |       ^
a.cc:29:16: error: 'v' was not declared in this scope
   29 |       u -= t * v; swap(u, v);
      |                ^
a.cc:31:5: error: 'x' was not declared in this scope
   31 |     x = x * u % MOD;
      |     ^
a.cc:31:13: error: 'u' was not declared in this scope
   31 |     x = x * u % MOD;
      |             ^
a.cc:31:17: error: 'MOD' was not declared in this scope
   31 |     x = x * u % MOD;
      |                 ^~~
a.cc: At global scope:
a.cc:37:1: error: 'istream' does not name a type
   37 | istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
      | ^~~~~~~
a.cc:38:1: error: 'ostream' does not name a type
   38 | ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
      | ^~~~~~~