#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; namespace { long long modinv(const long long& a, const long long& m) { long long s = a; long long t = m; long long xs = 1; long long xt = 0; while (s) { long long q = t / s; t -= q * s; std::swap(s, t); xt -= q * s; std::swap(xs, xt); } assert(t == 1); while (xt < 0) { xt += m; } while (xt >= m) { xt -= m; } return xt; } } // namespace class mint { private: long long val; long long raw; public: static long long mod; static long long mod_inv; mint(long long v = 0) : val(v), raw(v) { assert(mod > 1 && mod < (1ll << 31)); if (val < 0) { val = (-val) % mod; val = mod - val; if (val == mod) { val = 0; } } else if (val >= mod) { val %= mod; } } explicit mint(long long v, long long r) : val(v), raw(r) {} mint operator=(const mint& m) { val = m.val; raw = m.raw; return *this; } long long gval() const { return this->val; } long long graw() const { return this->raw; } mint operator+(const mint& m) const { return mint{(val + m.val >= mod ? (val + m.val - mod) : (val + m.val)), raw + m.raw}; } mint operator-(const mint& m) const { return mint{(val - m.val < 0 ? (val - m.val + mod) : (val - m.val)), raw - m.raw}; } mint operator*(const mint& m) const { // とりあえず愚直計算。 // 暇な時に高速なのにしておく return mint{(val * m.val) % mod, raw * m.raw}; } mint inv() const { long long v2 = modinv(val, mod); return v2; } mint operator/(const mint& m) const { return (*this) * m.inv(); } void operator+=(const mint& m) { *this = (*this) + m; } void operator-=(const mint& m) { *this = (*this) - m; } void operator*=(const mint& m) { *this = (*this) * m; } void operator/=(const mint& m) { *this = (*this) / m; } }; void init(long long m) { mint::mod = m; // mint::mod_inv = (-1ull) / m + 1; } std::ostream& operator<<(std::ostream& stream, const mint& m) { const std::string sv = std::to_string(m.gval()); stream << sv; return stream; } class big_mint { }; using ll = long long; using Vi = vector; using VVi = vector; using Vl = vector; using VVl = vector; using Pii = pair; using Vp = vector; using VVp = vector; using Pl = pair; using Vpl = vector; using VVpl = vector; using tup = tuple; using Vt = vector>; using Pll = pair; using Vc = vector; using VVc = vector; template using PQmax = priority_queue; template using PQmin = priority_queue, greater>; //再帰で計算するトポロジカルソート void tprsort(int u, const VVi& gr, Vi& tpr, Vi& par); //キューで計算するトポロジカルソート void tprsort(const VVi& gr, Vi& tpr); ll mpow(ll x, ll n, ll m = 1e9 + 7); ll comb(int n, int r, const Vl& kai, const Vl& fkai, ll m = 1e9 + 7); ll gcd(ll a, ll b); int LCA(const VVi& par, const Vi& depth, int a, int b); Vi sccResolve(const VVi& gr); void dijkstra(const VVi& gr, const VVl& cost, Vl& dist, int s); ll mint::mod = 998244353; struct S { mint val; ll siz; }; S comp(S a, S b) { return S{a.val + b.val, a.siz + b.siz}; } using F = mint; S mapp(S a, F b) { return S{a.val + b * a.siz, a.siz}; } F fnc(F a, F b) { return F{a + b}; } S e{0, 1}; F id{0}; int main() { ll N, M; cin >> N >> M; mint ans = 0; mint kj = 1; if (N < M) { cout << 0 << endl; return 0; } for (int i = 0; i < M; i++) { kj *= (M - i); kj /= (i + 1); ans += kj; } mint sm = mpow(2, N, mint::mod); ans = sm - ans; cout << ans << endl; } // Library void tprsort(int u, const VVi& gr, Vi& tpr, Vi& par) { // idx[u] = tpr.size(); /*for (int v : gr[u]) { if (par[v] == u || par[v] == -1) { par[v] = u; tprsort(v, gr, tpr, par); } } tpr.push_back(u);*/ stack st; st.push(u); bool vis[2000020]; for (int i = 0; i <= gr.size(); i++) { vis[i] = false; } while (!st.empty()) { int v = st.top(); if (!vis[v]) { vis[v] = true; for (int p : gr[v]) { if (par[p] == -1) { par[p] = v; st.push(p); } } } else { tpr.push_back(v); st.pop(); } } } Vi sccResolve(const VVi& gr) { int N = gr.size(); Vi tpr; Vi par(N, -1); for (int i = 0; i < N; i++) { if (par[i] == -1) { tprsort(i, gr, tpr, par); } } Vi ret(N, -1); int now = 0; for (int i = N - 1; i >= 0; i--) { int u = tpr[i]; if (ret[u] != -1) { continue; } ret[u] = now; stack st; st.push(u); while (!st.empty()) { int v = st.top(); st.pop(); for (int p : gr[v]) { if (ret[p] == -1) { st.push(p); ret[p] = now; } } } now++; } return ret; } ll gcd(ll a, ll b) { while (b) { a %= b; swap(a, b); } return a; } ll mpow(ll x, ll n, ll m) { ll ret = 1; while (n) { if (n % 2) { ret *= x; ret %= m; } x = (x * x) % m; n /= 2; } return ret; } ll comb(int n, int r, const Vl& kai, const Vl& fkai, ll m) { if (n < 0 || r < 0 || n < r) { return 0; } ll ret = kai[n]; ret *= fkai[r]; ret %= m; ret *= fkai[n - r]; ret %= m; return ret; } int LCA(const VVi& par, const Vi& depth, int a, int b) { if (depth[a] < depth[b]) { swap(a, b); } int dis = depth[a] - depth[b]; for (int i = 19; i >= 0; i--) { if ((dis >> i) & 1) { a = par[i][a]; } } if (a == b) { return a; } for (int i = 19; i >= 0; i--) { if (par[i][a] != par[i][b]) { a = par[i][a]; b = par[i][b]; } } return par[0][a]; } void dijkstra(const VVi& gr, const VVl& cost, Vl& dist, int s) { ll INF = (ll)1e18; dist.assign(gr.size(), INF); dist[s] = 0; PQmin pque; pque.push(make_pair(0, s)); while (!pque.empty()) { auto [L, u] = pque.top(); pque.pop(); while (L != dist[u] && !pque.empty()) { tie(L, u) = pque.top(); pque.pop(); } for (int i = 0; i < gr[u].size(); i++) { int v = gr[u][i]; ll c = cost[u][i]; if (dist[v] > c + L) { dist[v] = c + L; pque.push(make_pair(dist[v], v)); } } } return; }