#include using namespace std; #define rep(i,a,b) for(int i=a;i fact; std::vector rev; std::vector fact_rev; combination(int max,long long mod):upper(max),MOD(mod),fact(max+1),rev(max+1),fact_rev(max+1){ for(long long i=0;i<=max;i++){ if(i<2){ fact[i]=1; fact_rev[i]=1; rev[i]=1; continue; } fact[i]=(fact[i-1]*i)%mod; rev[i]=mod-((mod/i)*rev[mod%i])%mod; fact_rev[i]=(fact_rev[i-1]*rev[i])%mod; } } long long Comb(int x,int y){ assert(upper>=x); if (x=x); if (x>N>>L>>U; const int mod=998244353; combination table(300'000,mod); ll ans=0; rep(i,L+N,U+N+1){ ans+=table.Comb(i+N-1,i); ans-=table.Comb(i+N-1,U+1+N); } cout<<(ans%mod+mod)%mod<<"\n"; }