#include #include #include #include using namespace std; using namespace atcoder; using ll=long long; using mint=modint998244353; #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} const int MAX=11000000; const ll MOD=998244353; mint fac[MAX+1],finv[MAX+1],inv[MAX+1]; void set_fac(){ 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]*i; inv[i]=-inv[MOD%i]*(MOD/i); finv[i]=finv[i-1]*inv[i]; } } mint cmb(int n,int r){ if (r<0||n>N>>K; mint ans=0; for(int i=0;i