#line 1 "Main.cpp" #include #include #include #include #include #line 2 "nachia\\math\\combination.hpp" #line 4 "nachia\\math\\combination.hpp" namespace nachia{ template class Comb{ private: ::std::vector F; ::std::vector iF; public: Comb(int n){ F.assign(n+1, Modint(1)); for(int i=1; i<=n; i++) F[i] = F[i-1] * Modint(i); iF.assign(n+1, Modint(1)); iF[n] = F[n].inv(); for(int i=n; i>=1; i--) iF[i-1] = iF[i] * Modint(i); } Modint factorial(int n) const { return F[n]; } Modint inv_factorial(int n) const { return iF[n]; } Modint inv_of(int n) const { return iF[n] * F[n-1]; } Modint comb(int n, int r) const { if(n < 0 || n < r || r < 0) return Modint(0); return F[n] * iF[r] * iF[n-r]; } Modint inv_comb(int n, int r) const { if(n < 0 || n < r || r < 0) return Modint(0); return iF[n] * F[r] * F[n-r]; } Modint perm(int n, int r) const { if(n < 0 || n < r || r < 0) return Modint(0); return F[n] * iF[n-r]; } Modint inv_perm(int n, int r) const { if(n < 0 || n < r || r < 0) return Modint(0); return iF[n] * F[n-r]; } Modint operator()(int n, int r) const { return comb(n,r); } }; } // namespace nachia #line 8 "Main.cpp" using namespace std; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; #define rep(i,n) for(int i=0; i<(int)(n); i++) using modint = atcoder::static_modint<998244353>; int main(){ int N,K,X; cin >> N >> K >> X; K--; X--; int R = N-K-1; nachia::Comb comb(N); modint ans = 0; rep(i,N-1) ans += modint(i) / 2 * comb.factorial(i + ((R<=i)?1:0)); ans += modint(X) / (N-1) * R * comb.factorial(R); for(int i=0; i