#include #include using namespace std; namespace my{ using ml=atcoder::modint998244353; auto&operator>>(istream&i,ml&x){int t;i>>t;x=t;return i;} auto&operator<<(ostream&o,const ml&x){return o<<(int)x.val();} #define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__) #define FO(n) for(ll ij=n;ij-->0;) #define FOR(i,...) for(auto[i,i##stop,i##step]=range(0,__VA_ARGS__);i=i##stop;i+=i##step) #define fe(a,e,...) for(auto&&__VA_OPT__([)e __VA_OPT__(,__VA_ARGS__]):a) #define schrodinger(p,c) (p?c:remove_cvref_t{}) #define base_operator(op,type) auto operator op(const type&v)const{auto copy=*this;return copy op##=v;} #define single_testcase void solve();}int main(){my::io();my::solve();}namespace my{ void io(){cin.tie(nullptr)->sync_with_stdio(0);cout<using pack_back_t=tuple_element_t>; templateconcept vectorial=is_base_of_v::value_type>,remove_cvref_t>; templateconstexpr int rank(){if constexpr(vectorial)return rank()+1;else return 0;} templatestruct core_t_helper{using core_t=T;}; templatestruct core_t_helper{using core_t=typename core_t_helper::core_t;}; templateusing core_t=core_t_helper::core_t; templateistream&operator>>(istream&i,vector&v){fe(v,e)i>>e;return i;} templateostream&operator<<(ostream&o,const vector&v){ll n=v.size();fo(i,n)o<?newline:space);return o;} templatestruct vec; templatestruct hvec_helper{using type=vec::type>;}; templatestruct hvec_helper<0,T>{using type=T;}; templateusing hvec=typename hvec_helper::type; templatestruct vec:vector{ static constexpr int R=rank>(); using C=core_t; using vector::vector; vec(const vector&v){vector::operator=(v);} vec(const auto&...a)requires(sizeof...(a)>=3){resizes(a...);} void resizes(const auto&...a){*this=make(a...);} static auto make(ll n,const auto&...a){if constexpr(sizeof...(a)==1)return vec(n,array{a...}[0]);else return vec(n,make(a...));} vec&operator^=(const vec&u){this->insert(this->end(),u.begin(),u.end());return*this;} vec&operator+=(const vec&u){vec&v=*this;assert(v.size()==u.size());fo(i,v.size())v[i]+=u[i];return v;} vec&operator-=(const vec&u){vec&v=*this;assert(v.size()==u.size());fo(i,v.size())v[i]-=u[i];return v;} vec&operator+=(const C&c){fe(*this,e)e+=c;return*this;} vec&operator*=(const C&c){fe(*this,e)e*=c;return*this;} base_operator(^,vec) base_operator(+,vec) base_operator(-,vec) base_operator(+,C); base_operator(*,C); vec&operator++(){fe(*this,e)++e;return*this;} vec&operator--(){fe(*this,e)--e;return*this;} ll size()const{return vector::size();} }; templaterequires(sizeof...(A)>=2)vec(const A&...a)->vec>>; vec(ll)->vec; void lin(auto&...a){(cin>>...>>a);} void pp(const auto&...a){ll n=sizeof...(a);((cout<0,space)),...);cout<concept modulary=requires(T t){t.mod();}; templatestruct factorial_linear{ ll M; vecfa,fa_inv; factorial_linear(ll M):M(M),fa(M+1){ fa[0]=1; fo(i,1,M+1)fa[i]=fa[i-1]*i; if constexpr(modulary){ fa_inv.resize(M+1); fa_inv.back()=fa.back().inv(); of(i,M)fa_inv[i]=fa_inv[i+1]*(i+1); } } T operator()(ll n)const{assert(n<=M);return fa[n];} T inv(ll n)const{assert(n<=M);return fa_inv[n];} }; templatestruct combination{ ll M; factorial_linearfa; combination(ll M):M(M),fa(M){} inline T operator()(ll n,ll k)const{return c(n,k);} T c(ll n,ll k)const{ if(n<0||k<0||n)return fa(n)*fa.inv(k)*fa.inv(n-k); else return fa(n)/fa(k)/fa(n-k); } T p(ll n,ll k)const{return c(n,k)*fa(k);} }; single_testcase void solve(){ LL(N,A,B); if(Acomb(N); if(A+B>N){ ml t=0;// 前からA要素を配置して残りN-A要素を配置する方法. fo(k,N-A+1)t+=comb(N-B,k)*comb(N-A,k)*comb.fa(k); // N-Bの要素とN-Aの要素がkペアそれぞれ同じサイクルに属する場合の数 = (N-Bからk要素選ぶ方法)*(N-Aからk要素選ぶ方法)*(全ペアの組み合わせ,すなわちk要素の並び替え) pp(t); }else{ ml t=0;// 前からA要素と後ろからB要素を配置して,残りのN-A-B要素を自由に配置する方法. fo(k,B+1)t+=comb(B,k)*comb(A,k)*comb.fa(k); // Aの要素とBの要素がkペアそれぞれ同じサイクルに属する場合の数 = (Bからk要素選ぶ方法)*(Aからk要素選ぶ方法)*(全ペアの組み合わせ,すなわちk要素の並び替え) // A+B要素配置された状態から残りN-A-Bを自由に配置する場合の数はN!/(A+B)!. t*=comb.fa(N)*comb.fa.inv(A+B); pp(t); } }}