#include using namespace std; #include using namespace atcoder; using mint = modint998244353; const int MOD = 998244353; vector fact, fact_inv, inv; void nCk_calc(int s) { fact.resize(s + 2); fact_inv.resize(s + 2); inv.resize(s + 2); fact[0] = 1; fact[1] = 1; fact_inv[0] = fact_inv[1] = 1; inv[1] = 1; for (int i = 2; i < s + 2; i++) { fact[i] = fact[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; fact_inv[i] = fact_inv[i - 1] * inv[i] % MOD; } } /* nCk :MODでの二項係数を求める(前処理 int_nCk が必要) 計算量:O(1) */ long long nCk(int n, int k) { if(0>n||0>k||n>n>>m; int a,b,c,d;cin>>a>>b>>c>>d; mint ans = 0; for(int i = 0;i <= min(d,b);i++){ //if(b-i>m-d||c