//g++ kyouyuu1.cpp -std=c++14 -O2 -I . #include using namespace std; #include using namespace atcoder; using ll = long long; using ld = long double; using vi = vector; using vvi = vector; using vll = vector; using vvll = vector; using vld = vector; using vvld = vector; #define fi first #define se second #define pb push_back #define pq_big(T) priority_queue,less> #define pq_small(T) priority_queue,greater> #define all(a) a.begin(),a.end() #define rep(i,start,end) for(ll i=start;i<(ll)(end);i++) #define per(i,start,end) for(ll i=start;i>=(ll)(end);i--) constexpr ll mod = 998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); clock_t start = clock(); ll n,m; cin>>n>>m; ll pow2=1,factional=1; //fac[i] := i! (i=0のときfac[i]=1) vll fac(n+100); vll invfac(n+100); rep(i,0,n+50){ fac[i]=factional; invfac[i]=inv_mod(fac[i],mod); factional*=(i+1); factional%=mod; } //powmod[i][j] := (m-i)^(n-j) vvll powmod(5100,vll(n+1)); rep(i,0,5100){ powmod[i][n]=1; per(j,n-1,0){ powmod[i][j]=powmod[i][j+1]*(m-i); powmod[i][j]%=mod; } } //mul := FFTするときにかけるやつ 0 + (2^1 - 1)/(2^1 * 1!) x + (2^2 - 1)/(2^2 * 2!) x^2 + ... といった具合 vll mul(n+1,0); rep(i,1,n+1){ pow2*=2; pow2%=mod; mul[i]=pow2-1; mul[i]*=inv_mod(pow2*fac[i],mod); mul[i]%=mod; //cout<=iとなるようなA'の数(を全通りの数列に対して足し合わせた合計) vll now(1,1); ll ans=0; vll get; rep(i,0,min(n,m+1)){ /* now=move(convolution(now,mul)); while(now.size()>n+10){ now.pop_back(); } rep(j,0,n+1){ //cout<