#ifndef CLASS_MODINT #define CLASS_MODINT #include template class modint { private: std::uint32_t n; public: modint() : n(0) {}; modint(std::int64_t n_) : n((n_ >= 0 ? n_ : mod - (-n_) % mod) % mod) {}; static constexpr std::uint32_t get_mod() { return mod; } std::uint32_t get() const { return n; } bool operator==(const modint& m) const { return n == m.n; } bool operator!=(const modint& m) const { return n != m.n; } modint& operator+=(const modint& m) { n += m.n; n = (n < mod ? n : n - mod); return *this; } modint& operator-=(const modint& m) { n += mod - m.n; n = (n < mod ? n : n - mod); return *this; } modint& operator*=(const modint& m) { n = std::uint64_t(n) * m.n % mod; return *this; } modint operator+(const modint& m) const { return modint(*this) += m; } modint operator-(const modint& m) const { return modint(*this) -= m; } modint operator*(const modint& m) const { return modint(*this) *= m; } modint inv() const { return (*this).pow(mod - 2); } modint pow(std::uint64_t b) const { modint ans = 1, m = modint(*this); while (b) { if (b & 1) ans *= m; m *= m; b >>= 1; } return ans; } }; #endif // CLASS_MODINT #include #include using namespace std; using mint = modint<998244353>; int main() { // step #1. read input int N, K, X; cin >> N >> K >> X; K -= 1; X -= 1; // step #2. preparation vector fact(N + 1); fact[0] = 1; for (int i = 1; i <= N; i++) { fact[i] = fact[i - 1] * i; } // step #3. calculation mint answer = 0; for (int i = 0; i < N; i++) { if (i < K) { answer += fact[N - i - 1] * (mint(N - i - 2) * mint(2).inv() + mint(N - X - 1) * mint(N - 1).inv()); } if (i > K) { answer += fact[N - i - 1] * (N - i - 1) * mint(2).inv(); } } answer += fact[N - K - 1] * (N - K - 1) * mint(X) * mint(N - 1).inv(); answer *= fact[N - 1]; cout << answer.get() << endl; return 0; }