//g++ 2.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; using vst = vector; using vvst = vector; #define fi first #define se second #define pb push_back #define eb emplace_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--) #define uniq(a) sort(all(a));a.erase(unique(all(a)),a.end()) using mint = modint998244353; constexpr ll mod = 998244353; const int MAX=510000; const long long MOD=998244353; long long fac[MAX],finv[MAX],inv[MAX]; void COMinit(){ fac[0]=fac[1]=1; finv[0]=finv[1]=1; inv[1]=1; for(int i=2;i=1.90){ failed=1; return; } if(a.size()==n){ ans+=f(a); return; } rep(i,0,m+1){ a.emplace_back(i); dfs(n,m,a); a.pop_back(); } } void solve1(){ vi a={}; dfs(n,m,a); assert(failed==0); cout<n)continue; ll cm=COM(n-j,k); ll pw2=pow_mod(2,k,mod)-1; mint now=cm*pw2; dp[i][j+k]+=now*dp[i-1][j]; } } } mint ans=0; rep(i,0,min(n,m+1)){ rep(j,0,n+1){ ans+=dp[i][j]*pow_mod(2*(m-i),n-j,mod); } } cout<>n>>m; solve1(); //solve2(); }