Language: C++

#include<bits/stdc++.h>
using namespace std;
//Modulo Calculation
const int MOD = 998244353;
//ModInt
template <int mod>
struct ModInt {
    int x;
    ModInt() : x(0) {}
    ModInt(ll x_) {
        if ((x = x_ % mod + mod) >= mod) x -= mod;
    }
    ModInt& operator+=(ModInt rhs) {
        if ((x += rhs.x) >= mod) x -= mod;
        return *this;
    }
    ModInt& operator-=(ModInt rhs) {
        if ((x -= rhs.x) < 0) x += mod;
        return *this;
    }
    ModInt& operator*=(ModInt rhs) {
        x = (unsigned long long)x * rhs.x % mod;
        return *this;
    }
    ModInt& operator/=(ModInt rhs) {
        x = (unsigned long long)x * rhs.inv().x % mod;
        return *this;
    }
  
    ModInt operator-() const { return -x < 0 ? mod - x : -x; }
    ModInt operator+(ModInt rhs) const { return ModInt(*this) += rhs; }
    ModInt operator-(ModInt rhs) const { return ModInt(*this) -= rhs; }
    ModInt operator*(ModInt rhs) const { return ModInt(*this) *= rhs; }
    ModInt operator/(ModInt rhs) const { return ModInt(*this) /= rhs; }
    ModInt &operator++ () { *this += 1; return *this;}
    ModInt operator++ (int) { *this += 1; return *this - 1;}
    ModInt &operator-- () { *this -= 1; return *this;}
    ModInt operator-- (int) { *this -= 1; return *this + 1;}
    bool operator==(ModInt rhs) const { return x == rhs.x; }    
    bool operator!=(ModInt rhs) const { return x != rhs.x; }
    bool operator<=(ModInt rhs) const { return x <= rhs.x; }
    bool operator>=(ModInt rhs) const { return x >= rhs.x; }
    bool operator<(ModInt rhs) const { return x < rhs.x; }
    bool operator>(ModInt rhs) const { return x > rhs.x; }
    ModInt inv() const { return pow(*this, mod - 2); }
  
    friend ostream& operator<<(ostream& s, ModInt<mod> a) {
        s << a.x;
        return s;
    }
    friend istream& operator>>(istream& s, ModInt<mod>& a) {
        s >> a.x;
        return s;
    }
};
using mint = ModInt<MOD>;

//二項定理計算
const int MAX = 1000010;
mint fac[MAX],finv[MAX],inv[MAX];
//テーブル作成
void COMinit(){
    fac[0]=fac[1]=1;
    finv[0]=finv[1]=1;
    inv[1]=1;
    for(int i=2;i<MAX;i++){
        fac[i]=fac[i-1]*(mint)i;
        inv[i]=(mint)MOD-inv[MOD%i]*(mint)(MOD/i);
        finv[i]=finv[i-1]*inv[i];
    }
}

//nCkを求める
mint COM(int n,int k){
    if(n < k or n < 0 or k < 0)return 0;
    return fac[n]*finv[k]*finv[n-k];
}

struct maketable{
    maketable(){COMinit();}
}maketable_;

mint res;
int main(){
    int n, k;
    cin >> n >> k;
    for(int r = n; r <= k; r++) res += COM(k, r) - COM(k, 2 * r - n + 1);
    cout << res << '\n';
}

Compiler output:
a.cc:10:14: error: expected ')' before 'x_'
   10 |     ModInt(ll x_) {
      |           ~  ^~~
      |              )
a.cc: In function 'void COMinit()':
a.cc:63:19: error: no match for 'operator=' (operand types are 'mint' {aka 'ModInt<998244353>'} and 'int')
   63 |     fac[0]=fac[1]=1;
      |                   ^
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>& ModInt<998244353>::operator=(const ModInt<998244353>&)'
    7 | struct ModInt {
      |        ^~~~~~
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'const ModInt<998244353>&'
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>& ModInt<998244353>::operator=(ModInt<998244353>&&)'
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'ModInt<998244353>&&'
a.cc:64:21: error: no match for 'operator=' (operand types are 'mint' {aka 'ModInt<998244353>'} and 'int')
   64 |     finv[0]=finv[1]=1;
      |                     ^
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>& ModInt<998244353>::operator=(const ModInt<998244353>&)'
    7 | struct ModInt {
      |        ^~~~~~
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'const ModInt<998244353>&'
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>& ModInt<998244353>::operator=(ModInt<998244353>&&)'
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'ModInt<998244353>&&'
a.cc:65:12: error: no match for 'operator=' (operand types are 'mint' {aka 'ModInt<998244353>'} and 'int')
   65 |     inv[1]=1;
      |            ^
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>& ModInt<998244353>::operator=(const ModInt<998244353>&)'
    7 | struct ModInt {
      |        ^~~~~~
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'const ModInt<998244353>&'
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>& ModInt<998244353>::operator=(ModInt<998244353>&&)'
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'ModInt<998244353>&&'
a.cc:67:31: error: no matching function for call to 'ModInt<998244353>::ModInt(int&)'
   67 |         fac[i]=fac[i-1]*(mint)i;
      |                               ^
a.cc:9:5: note: candidate: 'ModInt<mod>::ModInt() [with int mod = 998244353]'
    9 |     ModInt() : x(0) {}
      |     ^~~~~~
a.cc:9:5: note:   candidate expects 0 arguments, 1 provided
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>::ModInt(const ModInt<998244353>&)'
    7 | struct ModInt {
      |        ^~~~~~
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'const ModInt<998244353>&'
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>::ModInt(ModInt<998244353>&&)'
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'ModInt<998244353>&&'
a.cc:68:22: error: no matching function for call to 'ModInt<998244353>::ModInt(const int&)'
   68 |         inv[i]=(mint)MOD-inv[MOD%i]*(mint)(MOD/i);
      |                      ^~~
a.cc:9:5: note: candidate: 'ModInt<mod>::ModInt() [with int mod = 998244353]'
    9 |     ModInt() : x(0) {}
      |     ^~~~~~
a.cc:9:5: note:   candidate expects 0 arguments, 1 provided
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>::ModInt(const ModInt<998244353>&)'
    7 | struct ModInt {
      |        ^~~~~~
a.cc:7:8: note:   no known conversion for argument 1 from 'const int' to 'const ModInt<998244353>&'
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>::ModInt(ModInt<998244353>&&)'
a.cc:7:8: note:   no known conversion for argument 1 from 'const int' to 'ModInt<998244353>&&'
a.cc:68:49: error: no matching function for call to 'ModInt<998244353>::ModInt(int)'
   68 |         inv[i]=(mint)MOD-inv[MOD%i]*(mint)(MOD/i);
      |                                                 ^
a.cc:9:5: note: candidate: 'ModInt<mod>::ModInt() [with int mod = 998244353]'
    9 |     ModInt() : x(0) {}
      |     ^~~~~~
a.cc:9:5: note:   candidate expects 0 arguments, 1 provided
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>::ModInt(const ModInt<998244353>&)'
    7 | struct ModInt {
      |        ^~~~~~
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'const ModInt<998244353>&'
a.cc:7:8: note: candidate: 'constexpr ModInt<998244353>::ModInt(ModInt<998244353>&&)'
a.cc:7:8: note:   no known conversion for argument 1 from 'int' to 'ModInt<998244353>&&'
a.cc: In function 'mint COM(int, int)':
a.cc:75:39: error: could not convert '0' from 'int' to 'mint' {aka 'ModInt<998244353>'}
   75 |     if(n < k or n < 0 or k < 0)return 0;
      |                                       ^
      |                                       |
      |                                       int