#include #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") using namespace std; typedef long long ll; const int N = 2e5; const ll mod = 998244353; ll fact[N+1], inv[N+1]; ll binpow(ll x, ll n){ ll res = 1; while(n){ if(n&1)res=(x*res)%mod; x=(x*x)%mod; n/=2; } return(res); } ll choose(int n, int k){ if(n> n >> m; vector dp(n+1); dp[1]=1; ll ans = 0; for(int z=0; z dp2(n+1); for(int i=1; i<=n; i++){ if(!dp[i])continue; for(int j=1; j<=min(i+1ll, n-i); j++){ dp2[i+j]=(dp2[i+j]+dp[i]*choose(i+1, j))%mod; } } swap(dp, dp2); } ans=(ans+dp[n]*choose(m, n))%mod; cout << ans; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); fact[0]=1; for(int i=1; i<=N; i++)fact[i]=(fact[i-1]*i)%mod; inv[N]=binpow(fact[N], mod-2); for(int i=N; i>0; i--)inv[i-1]=(inv[i]*i)%mod; solve(); return 0; }