criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

constexpr ll infl = 10000000000000000LL;
constexpr int inf = 1000000000;

template <int MaxN = 100000, long long mod = 1000000007LL>
class Modlib {
    long long _fact[MaxN + 1];
    long long _fact_inv[MaxN + 1];

public:
    // x^n
    long long pow(long long x, long long n) const {
        long long ret = 1LL;
        long long t = x % mod;
        while (n > 0) {
            if (n & 1LL) {
                ret *= t;
                ret %= mod;
            }
            t *= t;
            t %= mod;
            n >>= 1;
        }
        return ret;
    }
    // xの逆元
    // https://qiita.com/drken/items/3b4fdf0a78e7a138cd9a
    constexpr long long inv(long long a) const {
        long long b = mod, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b;
            a ^= b;
            b ^= a;
            a ^= b;

            u -= t * v;
            u ^= v;
            v ^= u;
            u ^= v;
        }
        u %= mod;
        if (u < 0)
            u += mod;
        return u;
    }
    // n!
    long long fact(long long n) const {
        return _fact[n];
    }
    // nPk
    long long perm(long long n, long long k) const {
        return fact(n) * _fact_inv[n - k] % mod;
    }
    // nCk
    long long comb(long long n, long long k) const {
        return perm(n, k) * _fact_inv[k] % mod;
    }

    constexpr Modlib() : _fact{}, _fact_inv{} {
        _fact[0] = _fact[1] = 1LL;
        for (int i = 2; i <= MaxN; ++i) {
            _fact[i] = _fact[i - 1] * i % mod;
        }
        _fact_inv[MaxN] = inv(_fact[MaxN]);
        for (int i = MaxN - 1; i >= 0; --i) {
            _fact_inv[i] = _fact_inv[i + 1] * (i + 1) % mod;
        }
    }
};

constexpr ll mod = 998244353LL;
constexpr auto modlib = Modlib<500000, mod>();

int main() {
    ll n, a, b, k;
    cin >> n >> a >> b >> k;
    ll ans = 0;
    for (ll i = 0; i <= n; ++i) {
        ll j = k - a * i;
        if (j % b != 0)
            continue;
        j /= b;
        if (!(0 <= j && j <= n))
            continue;
        ans += modlib.comb(n, i) * modlib.comb(n, j) % mod;
        ans %= mod;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:87:45:   in 'constexpr' expansion of 'Modlib<500000, 998244353>()'
a.cc:76:9: error: 'constexpr' loop iteration count exceeds limit of 262144 (use '-fconstexpr-loop-limit=' to increase the limit)
   76 |         for (int i = 2; i <= MaxN; ++i) {
      |         ^~~
Language: C++

#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

constexpr ll infl = 10000000000000000LL;
constexpr int inf = 1000000000;

template <int MaxN = 100000, long long mod = 1000000007LL>
class Modlib {
    long long _fact[MaxN + 1];
    long long _fact_inv[MaxN + 1];

public:
    // x^n
    long long pow(long long x, long long n) const {
        long long ret = 1LL;
        long long t = x % mod;
        while (n > 0) {
            if (n & 1LL) {
                ret *= t;
                ret %= mod;
            }
            t *= t;
            t %= mod;
            n >>= 1;
        }
        return ret;
    }
    // xの逆元
    // https://qiita.com/drken/items/3b4fdf0a78e7a138cd9a
    long long inv(long long a) const {
        long long b = mod, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b;
            swap(a, b);
            u -= t * v;
            swap(u, v);
        }
        u %= mod;
        if (u < 0)
            u += mod;
        return u;
    }
    // n!
    long long fact(long long n) const {
        return _fact[n];
    }
    // nPk
    long long perm(long long n, long long k) const {
        return fact(n) * _fact_inv[n - k] % mod;
    }
    // nCk
    long long comb(long long n, long long k) const {
        return perm(n, k) * _fact_inv[k] % mod;
    }

    constexpr Modlib() : _fact{}, _fact_inv{} {
        _fact[0] = _fact[1] = 1LL;
        for (int i = 2; i <= MaxN; ++i) {
            _fact[i] = _fact[i - 1] * i % mod;
            _fact_inv[i] = inv(_fact[i]);
        }
    }
};

constexpr ll mod = 998244353LL;
constexpr auto modlib = Modlib<300000, mod>();

int main() {
    ll n, a, b, k;
    cin >> n >> a >> b >> k;
    ll ans = 0;
    for (ll i = 0; i <= n; ++i) {
        ll j = k - a * i;
        if (j % b != 0)
            continue;
        j /= b;
        if (!(0 <= j && j <= n))
            continue;
        ans += modlib.comb(n, i) * modlib.comb(n, j) % mod;
        ans %= mod;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:79:45:   in 'constexpr' expansion of 'Modlib<300000, 998244353>()'
a.cc:73:31: error: call to non-'constexpr' function 'long long int Modlib<MaxN, mod>::inv(long long int) const [with int MaxN = 300000; long long int mod = 998244353]'
   73 |             _fact_inv[i] = inv(_fact[i]);
      |                            ~~~^~~~~~~~~~
a.cc:42:15: note: 'long long int Modlib<MaxN, mod>::inv(long long int) const [with int MaxN = 300000; long long int mod = 998244353]' declared here
   42 |     long long inv(long long a) const {
      |               ^~~
Language: C++

#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

constexpr ll infl = 10000000000000000LL;
constexpr int inf = 1000000000;

template <int MaxN = 100000, long long mod = 1000000007LL>
class Modlib {
    long long _fact[MaxN + 1];
    long long _fact_inv[MaxN + 1];

public:
    // x^n
    long long pow(long long x, long long n) const {
        long long ret = 1LL;
        long long t = x % mod;
        while (n > 0) {
            if (n & 1LL) {
                ret *= t;
                ret %= mod;
            }
            t *= t;
            t %= mod;
            n >>= 1;
        }
        return ret;
    }
    // xの逆元
    // https://qiita.com/drken/items/3b4fdf0a78e7a138cd9a
    long long inv(long long a) const {
        long long b = mod, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b;
            swap(a, b);
            u -= t * v;
            swap(u, v);
        }
        u %= mod;
        if (u < 0)
            u += mod;
        return u;
    }
    // n!
    long long fact(long long n) const {
        return _fact[n];
    }
    // nPk
    long long perm(long long n, long long k) const {
        return fact(n) * _fact_inv[n - k] % mod;
    }
    // nCk
    long long comb(long long n, long long k) const {
        return perm(n, k) * _fact_inv[k] % mod;
    }

    constexpr Modlib() : _fact{} {
        _fact[0] = _fact[1] = 1LL;
        for (int i = 2; i <= MaxN; ++i) {
            _fact[i] = _fact[i - 1] * i % mod;
            _fact_inv[i] = inv(_fact[i]);
        }
    }
};

constexpr ll mod = 998244353LL;
constexpr auto modlib = Modlib<300000, mod>();

int main() {
    ll n, a, b, k;
    cin >> n >> a >> b >> k;
    ll ans = 0;
    for (ll i = 0; i <= n; ++i) {
        ll j = k - a * i;
        if (j % b != 0)
            continue;
        j /= b;
        if (!(0 <= j && j <= n))
            continue;
        ans += modlib.comb(n, i) * modlib.comb(n, j) % mod;
        ans %= mod;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:79:45: error: 'constexpr Modlib<MaxN, mod>::Modlib() [with int MaxN = 300000; long long int mod = 998244353]' called in a constant expression
   79 | constexpr auto modlib = Modlib<300000, mod>();
      |                                             ^
a.cc:69:15: note: 'constexpr Modlib<MaxN, mod>::Modlib() [with int MaxN = 300000; long long int mod = 998244353]' is not usable as a 'constexpr' function because:
   69 |     constexpr Modlib() : _fact{} {
      |               ^~~~~~
a.cc:69:15: error: member 'Modlib<300000, 998244353>::_fact_inv' must be initialized by mem-initializer in 'constexpr' constructor
a.cc:22:15: note: declared here
   22 |     long long _fact_inv[MaxN + 1];
      |               ^~~~~~~~~
a.cc:71:9: error: 'goto' is not a constant expression
   71 |         for (int i = 2; i <= MaxN; ++i) {
      |         ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;



const int MAXN = 1e5 * 3 + 5;
const int mod = 998244353;

long long fakt[MAXN];

int n;
long long a, b, k;
long long sol = 0;


int mul (int a, int b) {
    return ((long long) a * b) % mod;
}
int add (int a, int b) {
    a+=b;
    if (a >= mod) return a-mod;
    return a;
}
int pow(int baza, int potencija) {
    int r = 1, a = baza, x = potencija;
    while (x) {
        if (x % 2 == 1) {
            r = mul(r,a);
        }
        a = mul(a,a);
        x/=2;
    }
    return r;
}
int divi (int a, int b) {
    return mul(a, pow(b,mod-2));
}

int main () {
    fakt[0] = 1;
    for (int i = 1 ; i < MAXN - 2; i++) {
        fakt[i] = mul(fakt[i-1],i);
    }
    cin >> n >> a >> b >> k;
    for (int i = 0  ; i <= n ; i ++) {
        long long A = a * i;
        if (A > K) break;
        if ((k - A) % b == 0 ) {
            //cout << "PROV: " <<A << " " << B;
            int j = (k-A) / b;
            if (j <= n) sol = add(sol , mul (divi (fakt[n] , mul(fakt[i] ,fakt[n-i] ) ) , divi (fakt[n] , mul(fakt[j] , fakt[n-j] ) ) ) );
        }
        else {
            continue;
        }
     }
    cout << sol;

    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:48:17: error: 'K' was not declared in this scope
   48 |         if (A > K) break;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define all(x) (x).begin(),(x).end()
#define sq(x) ((x)*(x))
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define repn(i,a,n) for(int (i)=(a);(i)<(int)(n);(i)++)
#define EQ(a,b) (abs((a)-(b))<eps)
template<class T> void chmin(T& a,const T& b){if(a>b)a=b;}
template<class T> void chmax(T& a,const T& b){if(a<b)a=b;}
#define MOD 998244353ll// prime
// How to devide :
// ModInt a(6ll);
// ModInt b(2ll);
// a *= b.exp(MOD-2ll);  -> a/=b;  result: a = 3
struct ModInt{
	ll val;
	ModInt():val(0ll){}
	ModInt(ll v):val(((v%MOD)+MOD)%MOD){}
	ModInt exp(ll y)const{
		if(!y)return ModInt(1ll);
		ModInt a = exp(y/2ll);
		a *= a;
		if(y&1)a*=(*this);
		return a;
	}
	bool operator==(const ModInt& x)const{return val==x.val;}
	inline bool operator!=(const ModInt& x)const{return !(*this==x);}
	bool operator<(const ModInt& x)const{return val<x.val;}
	bool operator>(const ModInt& x)const{return val>x.val;}
	inline bool operator>=(const ModInt& x)const{return !(*this<x);}
	inline bool operator<=(const ModInt& x)const{return !(*this>x);}
	ModInt& operator+=(const ModInt& x){if((val+=x.val)>=MOD)val-=MOD;return *this;}
	ModInt& operator-=(const ModInt& x){if((val+=MOD-x.val)>=MOD)val-=MOD;return *this;}
	ModInt& operator*=(const ModInt& x){(val*=x.val)%=MOD;return *this;}
	ModInt operator+(const ModInt& x)const{return ModInt(*this)+=x;}
	ModInt operator-(const ModInt& x)const{return ModInt(*this)-=x;}
	ModInt operator*(const ModInt& x)const{return ModInt(*this)*=x;}
};
istream& operator>>(istream&i,ModInt&x){i>>x.val;return i;}
ostream& operator<<(ostream&o,const ModInt&x){o<<x.val;return o;}
ModInt pow(ModInt a,ll x){
	ModInt res = ModInt(1ll);
	while(x){
		if(x&1)res *= a;
		x >>= 1;
		a = a*a;
	}
	return res;
}
const int SIZE = 100100;
ModInt inv[SIZE+10],fac[SIZE+10],facinv[SIZE+10];
// notice: 0C0 = 1 
ModInt nCr(int n,int r){
	assert(!(n<r));
	assert(!(n<0||r<0));
	return fac[n]*facinv[r]*facinv[n-r];
}
void init(){
	fac[0]=ModInt(1ll);
	for(int i=1;i<=SIZE;i++)fac[i]=fac[i-1]*ModInt(i);
	inv[1]=ModInt(1ll);
	for(int i=2;i<=SIZE;i++)inv[i]=ModInt(0ll)-ModInt(MOD/i)*inv[MOD%i];
	facinv[0]=ModInt(1ll);
	for(int i=1;i<=SIZE;i++)facinv[i]=facinv[i-1]*inv[i];
	return;
}
int N;
ll A,B,K;
int main(){
	init();
	cin >> N >> A >> B >> K;
	ModInt ans;
	for(int i=0;i<=N;i++){
		ll rem = K-A*(ll)i;
		if(rem<0ll)break;
		if(rem%B!=0ll)continue;
		ll p = (ll)i,q = rem/B;
		if(q>N)continue;
		ans += nCr(N,p)*nCn(N,q);
	}
	cout << ans << endl;
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:90:33: error: 'nCn' was not declared in this scope; did you mean 'nan'?
   90 |                 ans += nCr(N,p)*nCn(N,q);
      |                                 ^~~
      |                                 nan
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const ll M = 998244353;

vector<ll> fac(300001); //n!(mod M)
vector<ll> ifac(300001); //k!^{M-2} (mod M)
//a,bの範囲的にこれだけ配列を用意していけば十分

ll mpow(ll x, ll n){ //x^n(mod M) ←普通にpow(x,n)では溢れてしまうため，随時mod計算
    ll ans = 1;
    while(n != 0){
        if(n&1) ans = ans*x % M;
        x = x*x % M;
        n = n >> 1;
    }
    return ans;
}

ll comb(ll a, ll b){ //aCbをmod計算
    if(a == 0 && b == 0)return 1;
    if(a < b || a < 0)return 0;
    ll tmp = ifac[a-b]* ifac[b] % M;
    return tmp * fac[a] % M;
}

int main() {
  ll N,A,B,K;
  cin >> N >> A >> B >> K;
  ll sum=0;
  for(int i=0;i<N/A+1;i++){
    if((K-A*i)%B==0){
      sum=(sum+(comb(N,i)*comb(N,(K-A*i)/B))%mod)%mod;
    }
  }
  cout << sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:46: error: 'mod' was not declared in this scope; did you mean 'modf'?
   35 |       sum=(sum+(comb(N,i)*comb(N,(K-A*i)/B))%mod)%mod;
      |                                              ^~~
      |                                              modf
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
//const int MOD = pow(10, 9) + 7;
const int MOD = 998244353;
//const int MOD = ;
int mod(int A, int M) {return (A % M + M) % M;}
const int INF = 1LL << 60;
const string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string abc = "abcdefghijklmnopqrstuvwxyz";
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}

int modinv(int a, int m)
{
  int b = m, x = 1, y = 0;
  while (b > 0)
  {
    int q = a / b, r = a - q * b, s = x - q * y;
    a = b; b = r;
    x = y; y = s;
  }
  return mod(x, m);
}

class combination
{
public:
  vector<int> fac, finv, inv;

  combination(int M)
  {
    fac = vector<int>(M, 1);
    finv = vector<int>(M, 1);
    inv = vector<int>(M, 1);

    for (int i = 2; i < M; i++)
    {
      fac.at(i) = fac.at(i - 1) * i % MOD;
      inv.at(i) = MOD - inv.at(MOD % i) * (MOD / i) % MOD;
      finv.at(i) = finv.at(i - 1) * inv.at(i) % MOD;
    }
  }

  int COM(int N, int K)
  {
    if (N < K) return 0;
    if (N < 0 || K < 0) return 0;
    return fac.at(N) * (finv.at(K) * finv.at(N - K) % MOD) % MOD;
  }
};

signed main()
{
  int N, A, B, K;
  cin >> N >> A >> B >> K;
  
  combination cmb(300100);

  int ans = 0;
  for (int i = 0; i < N; i++)
  {
    int j = (K - A * i) / B;
    if (j < 0 || N < j || A * i + B * j != K) continue;

    ans += cmb.COM(N, i) * cmb.COM(N, j)
    ans %= MOD;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:41: error: expected ';' before 'ans'
   67 |     ans += cmb.COM(N, i) * cmb.COM(N, j)
      |                                         ^
      |                                         ;
   68 |     ans %= MOD;
      |     ~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

 
const long long mod = 998244353;
const int maxn = 3e5 + 100;
long long fac[maxn],inv[maxn];
 
long long q_pow(long long x,long long n)
{
    long long res = 1;
    while(n > 0)
    {
        if(n & 1) res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }
    return res;
}
 
void inti()
{
    int i;
    fac[0] = 1;
    for(i = 1;i < maxn;i++)
    {
        fac[i] = (fac[i - 1] * i) % mod;
    }
    inv[maxn - 1] = q_pow(fac[maxn - 1],mod - 2);
    for(i = maxn - 2;i >= 0;i--)
    {
        inv[i] = inv[i + 1] * (i + 1) % mod;
    }
}
 
long long C(int n,int m)
{
    if(n < m) return 0;
    return fac[n] * inv[m] % mod * inv[n - m] % mod;
}


int main ()
{
    init();
    cin>>n>>a>>b>>k;
    if(k==0)
    {
        puts("1");
        return 0;
    }
    for(register int x=0;x<=n;x++)
    {
        if(k-a*x<0)
            continue;
        if((k-a*x)%b)
            continue;
        ll y=(k-a*x)/b;
        if(y>n)
            continue;
        sum=(sum+C(n,x)%mod*C(n,y)%mod)%mod;
    }
    cout << sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:5: error: 'init' was not declared in this scope; did you mean 'inti'?
   47 |     init();
      |     ^~~~
      |     inti
a.cc:48:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   48 |     cin>>n>>a>>b>>k;
      |          ^
      |          yn
a.cc:48:13: error: 'a' was not declared in this scope
   48 |     cin>>n>>a>>b>>k;
      |             ^
a.cc:48:16: error: 'b' was not declared in this scope
   48 |     cin>>n>>a>>b>>k;
      |                ^
a.cc:48:19: error: 'k' was not declared in this scope
   48 |     cin>>n>>a>>b>>k;
      |                   ^
a.cc:54:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   54 |     for(register int x=0;x<=n;x++)
      |                      ^
a.cc:63:9: error: 'sum' was not declared in this scope
   63 |         sum=(sum+C(n,x)%mod*C(n,y)%mod)%mod;
      |         ^~~
a.cc:65:13: error: 'sum' was not declared in this scope
   65 |     cout << sum << endl;
      |             ^~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e6+50;
const int mod = 998244353;
ll fac[maxn],inv[maxn];
ll n,a,b,k;
ll qpow(ll a,ll b)
{
    ll res=1;
    while(b)
    {
        if(b&1)
            res=(res*a)%mod;
        a=a*a%mod;
        b>>=1;
    }
    return res;
}
void init()
{
    fac[0]=1;
    for(int i=1;i<=maxn-1;i++)
        fac[i]=(fac[i-1]*i)%mod;
    inv[maxn-1]=qpow(fac[maxn-1],mod-2);
    for(int i=maxn-2;i>=0;i--)
    {
        inv[i]=(inv[i+1])*(i+1)%mod;
    }
}
ll C(ll x,ll y)
{
    if(!x&&!y)
        return 1;
    if(x<y)
        return 0;
    return fac[x]*inv[y]%mod*inv[x-y]%mod;
}
int main ()
{
    cin>>n>>a>>b>>k;
    init();
    if(k==0)
    {
        puts("1");
        return 0;
    }
    for(register int x=1;x<=n;x++)
    {
        if((k-a*x)%b)
            continue;
        ll y=(k-a*x)/b;
        sum=(sum+C(n,x)%mod*C(n,y)%mod)%mod;
    }
    cout << sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   49 |     for(register int x=1;x<=n;x++)
      |                      ^
a.cc:54:9: error: 'sum' was not declared in this scope
   54 |         sum=(sum+C(n,x)%mod*C(n,y)%mod)%mod;
      |         ^~~
a.cc:56:13: error: 'sum' was not declared in this scope
   56 |     cout << sum << endl;
      |             ^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
const ll maxn = 1e7+50;
const ll mod = 998244353;
ll fac[maxn],inv[maxn];
ll n,a,b,k;
ll qpow(ll a,ll b)
{
    ll res=1;
    while(b)
    {
        if(b&1)
        {
            res=(res*a)%mod;
        }
        a=(a*a)%mod;
        b>>=1;
    }
    return res;
}
void init()
{
    fac[0]=1;
    for(ll i=1;i<=n+1;i++)
        fac[i]=(fac[i-1]*i)%mod;
    inv[n+1]=qpow(fac[n+1],mod-2);
    for(ll i=n;i>=0;i--)
        inv[i]=(inv[i+1]*(i+1))%mod;
}
ll C(ll x,ll y)
{
    if(!x&&!y)
        return 1;
    if(x<y)
        return 0;
    return fac[x]*inv[y]%mod*inv[x-y]%mod;
}

int main (){

    int n,a,b;
    ll k,ans=0;
    scanf("%d %d %d %lld",&n,&a,&b,&k);
    init();
    if(k==0) { puts("1"); return 0;}
    for(int  x=1;x<=n;x++){
        if((k-a*x)%b) continue;
        ll y=(k-a*x)/b;
        ans=(ans+c(n,x)*1ll%mod*c(n,y)*1ll%mod)%mod;
    }
    printf("%I64d\n",ans);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:18: error: 'c' was not declared in this scope
   51 |         ans=(ans+c(n,x)*1ll%mod*c(n,y)*1ll%mod)%mod;
      |                  ^
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxn = 1e7+50;
const ll mod = 998244353;
ll n,a,b,k;
ll sum=0;
ll fac[maxn],inv[maxn];

ll power(ll a,ll b){
    ll ans=1;
    while(b){
        if(b&1) ans=ans*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ans;
}

void init(){
    fac[0]=1,fac[1]=1;
    for(int i=2;i<=maxn;i++) fac[i]=fac[i-1]*1ll*i%mod;
    inv[maxn]=power(fac[maxn],mod-2)*1ll;
    for(int i=maxn-1;i>=0;i--) inv[i]=inv[i+1]*1ll*(i+1)%mod;
}

ll c(ll n,ll m){
    if(m==0) return 1;
    if(n<m) return 0;
    if(n==m) return 1;
    return fac[n]*1ll*inv[m]*1ll%mod*inv[n-m]%mod;
}

int main()
{
    cin>>n>>a>>b>>k;
    init();
    if(k==0)
    {
        cout << 1 << endl;
        return 0;
    }
    for(register int i=0;i<=n;i++)
    {
        ll temp=k-a*i;
        if(temp%b==0)
        {
            ll ty=temp/b;
            sum=(sum+C(n,i)%mod*C(n,ty)%mod)%mod;
        }
    }
    cout << sum << endl;
    //cout << "Hello world!" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   44 |     for(register int i=0;i<=n;i++)
      |                      ^
a.cc:50:22: error: 'C' was not declared in this scope
   50 |             sum=(sum+C(n,i)%mod*C(n,ty)%mod)%mod;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long



signed main(){
    int n,a,b,k;
    int mod =998244353;
    cin >> n>>a>>b>>k;
    int b0=b,a0=a,t;
    if(a0>b0){
        t=b0;
        b0=a0;a0=t;
    }
    while(a0!=0){
        t=b0%a0;
        b0=a0;
        a0=t;
    }
    int q=a/b0,p=b/b0;
   // cerr <<p<<' '<<q<<endl;
    if(k%b0!=0){
        cout<<0;
    }
    else{
    int x=0,k0=k;
    while(k0%b!=0){
        x++;
        k0-=a;
    }
    int y=k0/b;
   // cerr << x<<' '<<y<<endl;
    int inv[n+1]={};
    inv[1] = 1;
    for(int i=2;i<=n;i++){
        inv[i]=mod-( inv[mod%i]*(mod/i))%mod;
       
    }
    int ans=1,qwe1=1,qwe2=1;
    for(int i=1;i<=x;i++){
        ans =(ans*(n+1-i)%mod)*inv[i]%mod;
        if(ans<=0)cerr<<i<<endl;
    }
    for(int i=1;i<=n-y;i++){
        ans=(ans*(n+1-i))%mod*inv[i]%mod;
        if(ans<=0)cerr<<i<<endl;
    }    
    //cerr <<ans<<endl;
    for(int t=0;x+(t+1)*p<=n&&y-(t+1)*q>=0;t++){
        qwe1=1;qwe2=1;
        for(int i=1;i<=p;i++)qwe1 =(qwe1*(n+1-x-t*p-i)V%mod)*inv[x+t*p+i]%mod;
        for(int i=1;i<=q;i++)qwe2=(qwe2*(y+1-t*q-i)%mod)*inv[n-y+t*q+i]%mod;
       // cerr <<qwe1<<' '<<qwe2<<endl;
        ans=ans*((1+qwe1*qwe2)%mod)%mod;
       // cerr <<ans<<endl;
    }
    cout <<ans;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:55: error: expected ')' before 'V'
   52 |         for(int i=1;i<=p;i++)qwe1 =(qwe1*(n+1-x-t*p-i)V%mod)*inv[x+t*p+i]%mod;
      |                                    ~                  ^
      |                                                       )
Language: C++

#include <iostream>
using namespace std;

typedef long long ll;

ll fact[MAX_P];

ll mod_inverce(ll a,ll m){
  ll x,y;
  extgcd(a,m,x,y);
  return (m+x%m)%m;
}

ll mod_fact(ll n,ll p,ll& e){
  e=0;
  if(n==0){
    return 1;
  }
  ll res=mod_fact(n/p,p,e);
  e+=n/p;
  
  if(n/p%2!=0){
    return res*(p-fact[n%p])%p;
  }
  return res*fact[n%p]%p;
}  
    
ll mod_comb(ll n,ll k,ll p){
  if(n<0 || k<0 || n<k){
    return 0;
  }
  ll e1,e2,e3;
  ll a1=mod_fact(n,p,e1),a2=mod_fact(k,p,e2),a3=mod_fact(n-k,p,e3);
  if(e1>e2+e3){
    return 0;
  }
  return a1*mod_inverse(a2*a3%p,p)%p;
}
    
int main(){
  ll n,a,b,k;
  cin >> n >> a >> b >> k;
  ll ans=0;
  for(int i=k%b;i<=k;i+=a){
    ans+=mod_comb(n,i,998244353)+mod_comb(n,(n-i)/b,998244353);
  }
  cout << ans%998244353 << endl;
}

Compiler output:
a.cc:6:9: error: 'MAX_P' was not declared in this scope
    6 | ll fact[MAX_P];
      |         ^~~~~
a.cc: In function 'll mod_inverce(ll, ll)':
a.cc:10:3: error: 'extgcd' was not declared in this scope
   10 |   extgcd(a,m,x,y);
      |   ^~~~~~
a.cc: In function 'll mod_fact(ll, ll, ll&)':
a.cc:23:19: error: 'fact' was not declared in this scope
   23 |     return res*(p-fact[n%p])%p;
      |                   ^~~~
a.cc:25:14: error: 'fact' was not declared in this scope
   25 |   return res*fact[n%p]%p;
      |              ^~~~
a.cc: In function 'll mod_comb(ll, ll, ll)':
a.cc:37:13: error: 'mod_inverse' was not declared in this scope; did you mean 'mod_inverce'?
   37 |   return a1*mod_inverse(a2*a3%p,p)%p;
      |             ^~~~~~~~~~~
      |             mod_inverce
Language: C++

ll Mode(ll a, ll b){
	ll sum = 1;
	while (b) {
		if (b & 1) {
			sum = (sum * a) % mod;
			b--;
		}
		b /= 2;
		a = a * a % mod;
	}
	return sum;
}
//快速幂取模 

ll inv(ll a){
	return Mode(a, mod - 2);
}
//逆元 

ll jc[N];
void init() //预处理算阶乘
{
    jc[0] = 1;
    for(int i = 1; i < N; ++i)
    jc[i] = jc[i-1] * i % mod;
}
ll C(ll n, ll m){
    if(n<0||m>n)
        return 0;
    return ((jc[n] % mod) * ((inv(jc[m]) * inv(jc[n - m])) % mod)) % mod;
}//组合数 

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll Mode(ll a, ll b){
      | ^~
a.cc:15:1: error: 'll' does not name a type
   15 | ll inv(ll a){
      | ^~
a.cc:20:1: error: 'll' does not name a type
   20 | ll jc[N];
      | ^~
a.cc: In function 'void init()':
a.cc:23:5: error: 'jc' was not declared in this scope
   23 |     jc[0] = 1;
      |     ^~
a.cc:24:24: error: 'N' was not declared in this scope
   24 |     for(int i = 1; i < N; ++i)
      |                        ^
a.cc:25:27: error: 'mod' was not declared in this scope
   25 |     jc[i] = jc[i-1] * i % mod;
      |                           ^~~
a.cc: At global scope:
a.cc:27:1: error: 'll' does not name a type
   27 | ll C(ll n, ll m){
      | ^~
Language: C++

#include<iostream>
using namespace std;

long long N, A, B;
long long K;
long long mod = 998244353;
long long fac_memo[300001], fac_inv_memo[300001], C_memo[300001]


long long pow(long long a, long long x){
    a %= mod;
    if(x == 0){
        return 1;
    }
    long long tmp = pow(a * a % mod, x / 2);
    return ((x%2)? a : 1LL) * tmp % mod;  
}

long long inv(long long x){
    return pow(x % mod, mod - 2);
}

long long fac(long long n){
    n %= mod;
    if(fac_memo[n] != 0){
        return fac_memo[n];
    }
    if(n == 0){
        return fac_memo[0] = 1LL;
    }
    return fac_memo[n] = n * fac(n-1) % mod;
}

long long C(long long n, long long r){
    return fac(n) * fac_inv_memo[n-r] % mod * fac_inv_memo[r] % mod;
}

int main(){
    cin >> N >> A >> B >> K;
    long long ans = 0;
    fac(300000);
    for(int i = 0; i <= N; i++){
        fac_inv_memo[i] = inv(fac_memo[i]);
    }
    for(int a = 0; a <= N; a++){
        if((K - a * A) % B != 0 || (K - a * A < 0)){
            continue;
        }
        int b = (K - a * A) / B;
        if(b > N){
            continue;
        }
        ans += C(N, a) * C(N, b) % mod;
        ans %= mod;
    }
    cout << ans << endl;
}


Compiler output:
a.cc:10:1: error: expected initializer before 'long'
   10 | long long pow(long long a, long long x){
      | ^~~~
a.cc: In function 'long long int inv(long long int)':
a.cc:20:12: error: 'pow' was not declared in this scope
   20 |     return pow(x % mod, mod - 2);
      |            ^~~
Language: C++

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;

// Define
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using int128 = __int128;
using cint = cpp_int;
const ll MOD = 998244353;
const ll INF = LONG_MAX;
const ull MAX = ULONG_MAX;
#define endl '\n'
#define space ' '
#define def inline auto
#define func inline constexpr ll
#define run __attribute__((constructor)) def _
#define all(v) begin(v), end(v)

// Debug
#define debug(...)                                                             \
    {                                                                          \
        cerr << __LINE__ << ": " << #__VA_ARGS__ << " = ";                     \
        for (auto &&X : {__VA_ARGS__}) cerr << "[" << X << "] ";               \
        cerr << endl;                                                          \
    }

// Loop
#define inc(i, a, n) for (ll i = (a), _##i = (n); i <= _##i; ++i)
#define dec(i, a, n) for (ll i = (a), _##i = (n); i >= _##i; --i)
#define each(i, a) for (auto &&i : a)
#define rep(i, n) inc(i, 0, n - 1)

// Stream
#define input(a) scanf("%lld", &(a))
#define output(a) printf("%lld\n", (a))
#define fout(n) cout << fixed << setprecision(n)
#define fasten cin.tie(0), ios::sync_with_stdio(0)

// Speed
run() { fasten, fout(10); }
#pragma GCC optimize("-O3")
#pragma GCC target("avx")

// Math
func gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
func lcm(ll a, ll b) { return a * b / gcd(a, b); }

def mod_pow(ll a, ll b) {
    if (b == 0) return 1LL;
    if (b & 1) return (a * mod_pow(a, b - 1)) % MOD;
    ll half = mod_pow(a, b / 2);
    return half * half % MOD;
}

def mod_comb(ll n, ll r) {
    r = min(r, n - r);
    ll sup = 1, sub = 1;
    rep(i, r) {
        sup *= n - i, sub *= i + 1;
        sup %= MOD, sub %= MOD;
    }
    return sup * mod_pow(sub, MOD - 2) % MOD;
}

signed main() {
    ll N, A, B, K, S = 0;
    cin >> N >> A >> B >> K;
    for(ll a = max(0, K - N * B); a * A <= K && a <= N; a++) {
        if((K - a * A) % B == 0) {
            ll b = (K - a * A) / B;
            if(b > N) continue;
            S += mod_comb(N, a) * mod_comb(N, b);
            S %= MOD;
        }
    }
    cout << S << endl;
}

// for compilation: g++ -O3 -o _ _.cpp -std=c++17

Compiler output:
a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long Conbi(ll x,ll y){
	if (x<0||y<0||x<y) return 0;
	return fac[x]*inv[y]%mod*inv[x-y]%mod;
}

int main(){
  long long a,b,c,d;
  cin>>a>>b>>c>>d;
  for (long long i=0;i<=a;i++){
	if ((d-i*b)%c==0){
		long long sum=(d-i*b)/c;
		ans=(ans+Conbi(a,i)*Conbi(a,sum)%998244353)%998244353;
	}
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:3:17: error: 'll' was not declared in this scope
    3 | long long Conbi(ll x,ll y){
      |                 ^~
a.cc:3:22: error: 'll' was not declared in this scope
    3 | long long Conbi(ll x,ll y){
      |                      ^~
a.cc:3:26: error: expression list treated as compound expression in initializer [-fpermissive]
    3 | long long Conbi(ll x,ll y){
      |                          ^
a.cc: In function 'int main()':
a.cc:14:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |                 ans=(ans+Conbi(a,i)*Conbi(a,sum)%998244353)%998244353;
      |                 ^~~
      |                 abs
a.cc:14:31: error: 'Conbi' cannot be used as a function
   14 |                 ans=(ans+Conbi(a,i)*Conbi(a,sum)%998244353)%998244353;
      |                          ~~~~~^~~~~
a.cc:14:42: error: 'Conbi' cannot be used as a function
   14 |                 ans=(ans+Conbi(a,i)*Conbi(a,sum)%998244353)%998244353;
      |                                     ~~~~~^~~~~~~
a.cc:17:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: Java

mport java.util.*;
 
class Main
{
    static int MOD = 998244353;
 
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        long K = sc.nextLong();
        long ans = 0;
        long[] comb = new long[n+1];
        comb[0] = 1;
        for(int i = 1; i < n+1; i++){
            comb[i] = comb[i-1] * (n - i + 1) / i % MOD;
        }
        long q = K + A;
        for(int x = 0; x <= n; x++){
            q -= A;
            if(q % B == 0){
                long y = q / B;
                if(y > n) continue;
                if(y < 0) break;
                ans = (ans + comb[x] * comb[(int)y] % MOD) % MOD;
            }
        }
        System.out.println(ans);
    }
 }

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

import java.util.*;

class Main
{
    static int MOD = 998244353;

    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        long K = sc.nextLong();
        long ans = 0;
        long p = K / A;
        for(long x = 0; x <= p; x++){
            long q = K - A * x;
            if(q % B == 0){
                long y = q / B;
                ans = (ans + calc(n, x) * calc(n, y) % MOD) % MOD;
            }
        }
        System.out.println(ans);
    }
    public static long calc(int n, long a)
    {
        long MulSumN = 1;
        long MulSumA = 1;
        for(int i = 1; i <= a; i++){
            MulSumN *= n - i + 1;
            MulSumN %= MOD;
            MulSumA *= i;
            MulSumA %= MOD;
        }
        return MulSumN * pow(MulSumA, MOD - 2) % MOD;
    }
    public static long pow(long a, int b){
        if(b == 1) return a;
        if(b % 2 == 0){
            long d = pow(a, b / 2);
            return d * d % MOD;
        }
        return a * pow(a, b - 1) % MOD;
    }


Compiler output:
Main.java:44: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

// In The Name Of God
#include <bits/stdc++.h>

#define sqr(A) ((A) * (A))
#define F first
#define S second
#define MP make_pair
#define bsz  __builtin_popcount
#define all(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int MOD = 998244353;
const int MOD2 = 1e9 + 9;
const int PR = 727;
const int INF = INT_MAX;
const ll LINF = LLONG_MAX;

const int N = 3e5 + 20;
ll ans, fac[N], n, a, b, k;

ll powmod(ll x, ll y, ll MODD = MOD) {
    if (y == 0) return 1LL;
    ll tmp = powmod(x, y / 2, MODD);
    tmp = sqr(tmp) % MODD;
    return (tmp * (y % 2 ? (x % MODD) : 1LL)) % MODD;
}

ll divmod(ll x, ll y, ll MODD = MOD) {
	return ((x % MODD) * powmod(y, MODD - 2, MODD)) % MODD;
}

ll CR(ll r, ll n, ll MODD = MOD) {
    return divmod(fac[n], (fac[r] * fac[n - r]) % MODD, MODD);
}

int main() {
	ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	fac[0] = 1;
	for (ll i = 1; i < N; i++)
		fac[i] = (fac[i - 1] * i) % MOD;
	cin >> n >> a >> b >> k;
	for (ll x = 0; x <= n; x++) {
		if (k >= x * a && (k - x * a) % b == 0) {
			if (y > n) continue;
			ll y = (k - x * a) / b;
			ans = (ans + CR(y, n) * CR(x, n)) % MOD;
		}
	}
	cout << ans << endl;
}








































Compiler output:
a.cc: In function 'int main()':
a.cc:46:29: error: 'y' was not declared in this scope
   46 |                         if (y > n) continue;
      |                             ^
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#define int long long

using namespace std;

const int mo=998244353;

int n,a,b,ans=0,jie[1000001],inv[1000001],k,x0,y0;

int C(int o,int p) {return 1ll*jie[o]*inv[p]%mo*inv[o-p]%mo;}

int mi(int o,int p)
{
	int u=1;
	while(p>0)
	{
		if(p&1) u=1ll*u*o%mo;
		o=1ll*o*o%mo;
		p>>=1;
	}
	return u;
}

signed main()
{
	jie[0]=inv[0]=1;
	for(int i=1;i<=1000000;i++) jie[i]=1ll*jie[i-1]*i%mo;
	for(int i=1;i<=1000000;i++) inv[i]=mi(jie[i],mo-2);
	scanf("%lld%lld%lld%lld",&n,&a,&b,&k);
	for(int i=0;(i<=n)&&(i*a<=k);i++)
	{
		if((k-i*a)%b!=0) continue;
		if(((k-i*a)/b)>n) continue;
		ans=(ans+1ll*C(n,i)*C(n,(k-i*a)/b)%mo)%mo;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:11:48: error: 'long long int y0' redeclared as different kind of entity
   11 | int n,a,b,ans=0,jie[1000001],inv[1000001],k,x0,y0;
      |                                                ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:256:1: note: previous declaration 'double y0(double)'
  256 | __MATHCALL (y0,, (_Mdouble_));
      | ^~~~~~~~~~
Language: C++

#include<cstdio>
#include<cassert>
using namespace std;
typedef long long ll;
const int maxn = 3e6 + 10;
const ll mod = 998244353;



ll inv[maxn] ,fac[maxn];


void prec(int n){
	inv[0] = 1;inv[1] = 1;fac[1] = 1;fac[0]= 1;
	for(int i = 2;i <= n;i++) inv[i] = mod - inv[mod % i] * (mod / i) % mod 
	for(int i = 2;i <= n;i++) inv[i] = (inv[i] * inv[i - 1]) % mod,fac[i] = (fac[i - 1] * i) % mod;
}
ll C(ll n,ll m){ if(n < m) return 0;return inv[m] * inv[n - m] % mod * fac[n] % mod;	}

int main(){
	ll n,A,B,k;
	prec(maxn - 1);
	scanf("%lld%lld%lld%lld",&n,&A,&B,&k);
	ll ans = 0;
	for(ll a = 0;a <= n;a++){
		ll x = k - a * A;
		if(x < 0) continue;
		if(x % B) continue;
		ll b = x / B;
		if(b > n || b < 0 ) continue; 
		ans = (ans + C(n,a) * C(n,b) % mod) % mod;
	}	
	printf("%lld\n",ans);
}

Compiler output:
a.cc: In function 'void prec(int)':
a.cc:15:80: error: expected ';' before 'for'
   15 |         for(int i = 2;i <= n;i++) inv[i] = mod - inv[mod % i] * (mod / i) % mod
      |                                                                                ^
      |                                                                                ;
   16 |         for(int i = 2;i <= n;i++) inv[i] = (inv[i] * inv[i - 1]) % mod,fac[i] = (fac[i - 1] * i) % mod;
      |         ~~~                                                                     
a.cc:16:23: error: 'i' was not declared in this scope
   16 |         for(int i = 2;i <= n;i++) inv[i] = (inv[i] * inv[i - 1]) % mod,fac[i] = (fac[i - 1] * i) % mod;
      |                       ^
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define ll long long
using namespace std;

const int mod = 998244353;
const int mnx = 3e5 + 9;

int n;
ll a, b, m;
ll fac[mnx];
ll invfac[mnx];

ll getPow(ll x, ll y) {
    LL res = 1;
    while( y ) {
        if(y&1) res = res * x % mod;
        x = x * x % mod;
        y >>= 1;
    }
    return res;
}

ll getC(int x, int y) {
    return fac[x] * invfac[y] % mod * invfac[x - y] % mod;
}

int main() {
    cin >> n >> a >> b >> m;
    fac[0] = 1;
    for(int i=1; i<mnx; i++)
        fac[i] = fac[i - 1] * i % mod;
    invfac[mnx - 1] = getPow(fac[mnx - 1],mod - 2);
    for(int i=mnx-2; i>=0; i--) invfac[i] = invfac[i + 1] * (i + 1) % mod;
    ll ans = 0;
    for(int i=0; i<=n; i++)
        if(a * i <= m && (m - a * i) % b == 0 && (m - a * i) / b <= n) {
            int j = (m - a * i) / b;
            ans += (getC(n, i) % mod * getC(n, j) % mod) % mod;
            ans %= mod;
        }
    cout << ans << '\n';
}


Compiler output:
a.cc: In function 'long long int getPow(long long int, long long int)':
a.cc:15:5: error: 'LL' was not declared in this scope; did you mean 'll'?
   15 |     LL res = 1;
      |     ^~
      |     ll
a.cc:17:17: error: 'res' was not declared in this scope
   17 |         if(y&1) res = res * x % mod;
      |                 ^~~
a.cc:21:12: error: 'res' was not declared in this scope
   21 |     return res;
      |            ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int MOD = 998244353;

ll modpow(ll b, ll e, ll m) {
	ll r = 1;
	while(e) {
		if(e&1) {
			r *= b;
			r %= m;
		}
		b *= b;
		b %= m;
		e /= 2;
	}
	return r;
}

ll fact[1000000];
ll invfact[1000000];

ll combo(int n, int k) {
	 ll ret = fact[n];
	 ret *= invfact[k];
	 ret %= MOD:
	 ret *= invfact[n-k];
	 ret %= MOD;
	 return ret;
}

int main() {
	ll n, a, b, k;
	scanf("%lld%lld%lld%lld", &n, &a, &b, &k);
	fact[0] = 1;
	for(int i = 1; i <= n; i++) {
		fact[i] = fact[i-1] * i;
		fact[i] %= MOD;
	}
	invfact[n] = modpow(fact[n], MOD-2, MOD);
	for(int i = n-1; i >= 0; i--) {
		invfact[i] = invfact[i+1] * (i+1);
		invfact[i] %= MOD;
	}
	ll ret = 0;
	for(int i = 0; i <= n; i++) {
		ll left = k - i*a;
		if(left%b || left/b > n) continue;
		int j = left/b;
		ret += combo(n, i) * combo(n, j);
		ret %= MOD;
	}
	printf("%lld\n", ret);
}

Compiler output:
a.cc: In function 'll combo(int, int)':
a.cc:30:20: error: found ':' in nested-name-specifier, expected '::'
   30 |          ret %= MOD:
      |                    ^
      |                    ::
a.cc:30:17: error: 'MOD' is not a class, namespace, or enumeration
   30 |          ret %= MOD:
      |                 ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int MOD = 998244353;

ll modpow(ll b, ll e, ll m) {
	ll r = 1;
	while(e) {
		if(e&1) {
			r *= b;
			r %= m;
		}
		b *= b;
		b %= m;
		e /= 2;
	}
	return r;
}

ll fact[1000000];
ll invfact[1000000];

ll combo(int n, int k) {
	 ll ret = fact[n];
	 ret *= invfact[k];
	 ret %= MOD:
	 ret *= invfact[n-k];
	 ret %= MOD:
	 return ret;
}

int main() {
	ll n, a, b, k;
	scanf("%lld%lld%lld%lld", &n, &a, &b, &k);
	fact[0] = 1;
	for(int i = 1; i <= n; i++) {
		fact[i] = fact[i-1] * i;
		fact[i] %= MOD;
	}
	invfact[n] = modpow(fact[n], MOD-2, MOD);
	for(int i = n-1; i >= 0; i--) {
		invfact[i] = invfact[i+1] * (i+1);
		invfact[i] %= MOD;
	}
	ll ret = 0;
	for(int i = 0; i <= n; i++) {
		ll left = k - i*a;
		if(left%b || left/b > n) continue;
		int j = left/b;
		ret += combo(n, i) * combo(n, j);
		ret %= MOD;
	}
	printf("%lld\n", ret);
}

Compiler output:
a.cc: In function 'll combo(int, int)':
a.cc:30:20: error: found ':' in nested-name-specifier, expected '::'
   30 |          ret %= MOD:
      |                    ^
      |                    ::
a.cc:30:17: error: 'MOD' is not a class, namespace, or enumeration
   30 |          ret %= MOD:
      |                 ^~~
a.cc:32:20: error: expected ';' before ':' token
   32 |          ret %= MOD:
      |                    ^
      |                    ;
a.cc:34:1: warning: no return statement in function returning non-void [-Wreturn-type]
   34 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define M 998244353
using namespace std;
int combi(long int n,long int k){
  vector<vector<long int> >vec(n+1,vector<long int>(n+1,0));
  for(int i=0;i<vec.size();i++){
    vec[i][0]=1;
    vec[i][i]=1;
  }
  for(int i=2;i<vec.size();i++){
    for(int j=1;j<i;j++){
      vec[i][j]=(vec[i-1][j-1]+vec[i-1][j])%M;
    }
  }
  return vec[n][k];
}
int main(){
  int n,a,b,k;
  cin>>n>>a>>b>>k;
  int sum=0;
  for(int x=0;x<=n;x++){
    for(int y=0;y<=n;y++){
      if(a*x+b*y==k){
        sum+=(combi(n,x)*combi(n,y))%M
      }
    }
  }
  cout<<sum<<endl;
}


  


Compiler output:
a.cc: In function 'int main()':
a.cc:25:7: error: expected ';' before '}' token
   25 |       }
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int conbi(long int n,long int k){
  int f=1;
  int g=1;
  if(k==0) return 1;
  else{
  for(int i=1;i<=k;i++) f*=i;
  for(int i=0;i<=k-1;i++) g*=n-i;
  return g/f;
  }
int main(){
  long int n,a,b,k;
  cin>>n>>a>>b>>k;
  long int sum=0;
  long int x,y,z;
  for(x=0;x<=n;x++){
    for(y=0;y<=n-x;y++){
        if((k-a*x-(a+b)*y)%b==0){
          z=(k-a*x-(a+b)*y)/b;
          if(z>=0)
            sum+=conbi(n,x)*conbi(n-x,y)*conbi(n-x-y,z);
        }
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int conbi(long int, long int)':
a.cc:12:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   12 | int main(){
      |         ^~
a.cc:12:9: note: remove parentheses to default-initialize a variable
   12 | int main(){
      |         ^~
      |         --
a.cc:12:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:12:11: error: a function-definition is not allowed here before '{' token
   12 | int main(){
      |           ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:3:33: note: to match this '{'
    3 | int conbi(long int n,long int k){
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int conbi(long int n,long int k){
  int f=1;
  int g=1;
  if(k==0) return 1;
  else{
  for(int i=1;i<=k;i++) f*=i;
  for(int i=0;i<=k-1;i++) g*=n-i;
  return g/f;
  }
}
int main(){
  long int n,a,b,k;
  cin>>n>>a>>b>>k;
  long int sum=0;
  long int x,y,z;
  for(x=0;x<=n;x++){
    for(y=0;y<=n-x;y++){
        if((k-a*x-(a+b)*y)%b==0){
          z=(k-a*x-(a+b)*y)/b;
          if(z>=0)
            sum+=conbi(n,x)*conbi(p,y)*conbi(q,z);
        }
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:35: error: 'p' was not declared in this scope
   23 |             sum+=conbi(n,x)*conbi(p,y)*conbi(q,z);
      |                                   ^
a.cc:23:46: error: 'q' was not declared in this scope
   23 |             sum+=conbi(n,x)*conbi(p,y)*conbi(q,z);
      |                                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int conbi(long int n,long int k){
  int f=1;
  int g=1;
  if(k==0) return 1;
  else{
  for(int i=1;i<=k;i++) f*=i;
  for(int i=0;i<=k-1;i++) g*=n-i;
  return g/f;
  }
}
int main(){
  long int n,a,b,k;
  cin>>n>>a>>b>>k;
  long int sum=0;
  long int x,y,z;
  for(x=0;x<=n;x++){
    for(y=0;y<=n-x;y++){
        if((k-a*x-(a+b)*y)%b==0){
          z=(k-a*x-(a+b)*y)/b;
          if(z>=0)
            long int p,q;
            p=n-x;
            q=n-x-y;
            sum+=conbi(n,x)*conbi(p,y)*conbi(q,z);
        }
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'p' was not declared in this scope
   24 |             p=n-x;
      |             ^
a.cc:25:13: error: 'q' was not declared in this scope
   25 |             q=n-x-y;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int conbi(long int n,long int k){
  int f=1;
  int g=1;
  if(k==0) return 1;
  else{
  for(int i=1;i<=k;i++) f*=i;
  for(int i=0;i<=k-1;i++) g*=n-i;
  return g/f;
  }
}
int main(){
  long int n,a,b,k;
  cin>>n>>a>>b>>k;
  long int sum=0;
  long int x,y,z;
  for(x=0;x<=n;x++){
    for(y=0;y<=n-x;y++){
        if((k-a*x-(a+b)*y)%b==0){
          z=(k-a*x-(a+b)*y)/b;
          if(z>=0)
            int p,q;
            p=n-x;
            q=n-x-y;
            sum+=conbi(n,x)*conbi(p,y)*conbi(q,z);
        }
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'p' was not declared in this scope
   24 |             p=n-x;
      |             ^
a.cc:25:13: error: 'q' was not declared in this scope
   25 |             q=n-x-y;
      |             ^