Language: C++

long long mul_mod(long long a, long long b, const long long MOD) {
  return b ? (mul_mod(a * 2, b / 2, MOD) + (b & 1 ? a : 0)) % MOD : 0;
}

long long bpow_mod(long long a, long long b, const long long MOD) {
  return (b ? bpow_mod(a * a % MOD, b / 2, MOD) * (b & 1 ? a : 1) : 1) % MOD;
}

long long inv_mod(long long a, const long long MOD) {
  return bpow_mod(a, MOD - 2, MOD);
}
vector<long long> MODS = {998244353};
template <int kind = 0, int fast = 0>
class mint {
 public:
  long long v;

  mint() : v(0) {}
  // mint(long long);
  mint(long long v)
      : v(fast == 0 ? (v < 0 ? (v % MODS[kind] + MODS[kind]) % MODS[kind]
                             : (v >= MODS[kind] ? v % MODS[kind] : v))
                    : (v)) {}
  long long get_mod() { return MODS[kind]; }
  long long get_val() { return v; }
  void take_mod() { v %= MODS[kind]; }
};

template <int kind, int fast>
ostream& operator<<(ostream& os, const mint<kind, fast>& x) {
  return os << (x.v % MODS[kind] + MODS[kind]) % MODS[kind];
}

template <int kind, int fast, int fast2>
bool operator==(mint<kind, fast>& a, mint<kind, fast2> b) {
  return a.v == b.v;
}
template <int kind, int fast, int fast2>
mint<kind, fast>& operator+=(mint<kind, fast>& a, mint<kind, fast2> b) {
  return a = a.v + b.v;
}
template <int kind>
mint<kind>& operator-=(mint<kind>& a, mint<kind> b) {
  return a = a.v - b.v;
}
template <int kind>
mint<kind>& operator*=(mint<kind>& a, mint<kind> b) {
  return a = a.v * b.v;
}
template <int kind>
mint<kind>& operator/=(mint<kind>& a, mint<kind> b) {
  return a = a.v * inv_mod(b.v, a.get_mod());
}
template <int kind, int fast, int fast2>
mint<kind, fast> operator+(mint<kind, fast> a, mint<kind, fast2> b) {
  return a += b;
}
template <int kind>
mint<kind> operator-(mint<kind> a, mint<kind> b) {
  return a -= b;
}
template <int kind>
mint<kind> operator*(mint<kind> a, mint<kind> b) {
  return a *= b;
}
template <int kind>
mint<kind> operator/(mint<kind> a, mint<kind> b) {
  return a /= b;
}
template <int kind, int fast>
mint<kind, fast>& operator+=(mint<kind, fast>& a, long long b) {
  return a = a.v + b;
}
template <int kind>
mint<kind>& operator-=(mint<kind>& a, long long b) {
  return a = a.v - b;
}
template <int kind>
mint<kind>& operator*=(mint<kind>& a, long long b) {
  return a = a.v * b;
}
template <int kind>
mint<kind>& operator/=(mint<kind>& a, long long b) {
  return a = a.v * inv_mod(b, a.get_mod());
}
template <int kind, int fast>
mint<kind, fast> operator+(mint<kind, fast> a, long long b) {
  return a += b;
}
template <int kind>
mint<kind> operator-(mint<kind> a, long long b) {
  return a -= b;
}
template <int kind>
mint<kind> operator*(mint<kind> a, long long b) {
  return a *= b;
}
template <int kind>
mint<kind> operator/(mint<kind> a, long long b) {
  return a /= b;
};

Compiler output:
a.cc:12:1: error: 'vector' does not name a type
   12 | vector<long long> MODS = {998244353};
      | ^~~~~~
a.cc: In constructor 'mint<kind, fast>::mint(long long int)':
a.cc:21:37: error: 'MODS' was not declared in this scope
   21 |       : v(fast == 0 ? (v < 0 ? (v % MODS[kind] + MODS[kind]) % MODS[kind]
      |                                     ^~~~
a.cc: In member function 'long long int mint<kind, fast>::get_mod()':
a.cc:24:32: error: 'MODS' was not declared in this scope
   24 |   long long get_mod() { return MODS[kind]; }
      |                                ^~~~
a.cc: In member function 'void mint<kind, fast>::take_mod()':
a.cc:26:26: error: 'MODS' was not declared in this scope
   26 |   void take_mod() { v %= MODS[kind]; }
      |                          ^~~~
a.cc: At global scope:
a.cc:30:1: error: 'ostream' does not name a type
   30 | ostream& operator<<(ostream& os, const mint<kind, fast>& x) {
      | ^~~~~~~