#pragma GCC optimize ("O3") #pragma GCC target ("avx") #include typedef long long int ll; // struct fastI{ // char in[1<<26]; // char const*o; // fastI(){ // o = in; // in[fread(in,1,sizeof(in)-4,stdin)]=0; // } // fastI& operator>>(char& c){ // while(*o&&*o<=32)++o; // c=*o++; // return *this; // } // fastI& operator>>(int& u){ // u=0; // unsigned s=0; // while(*o&&*o<=32)++o; // if (*o == '-')s = ~s, ++o; else if (*o == '+')++o; // while('0'<=*o && *o<='9')u = (u<<3) + (u << 1) + (*o++ - '0'); // (u^=s)+=!!s; // return *this; // } // fastI& operator>>(long long& u){ // u=0; // uint64_t s=0; // while(*o&&*o<=32)++o; // if (*o == '-')s = ~s, ++o; else if (*o == '+')++o; // while('0'<=*o && *o<='9')u = (u<<3) + (u << 1) + (*o++ - '0'); // (u^=s)+=!!s; // return *this; // } // } fin; const ll mod=998244353; const int N=1024; int A[1024]; ll dp[42][1024]; int n,k,m,x,y,a; int main(){ scanf("%d%d%d%d",&n,&m,&x,&y);y++; for(int i=0;i0)); } } ll res=0; for(int i=x;;i++){ if(i==N || i==y)break; res+=dp[n][i]; } res%=mod; printf("%lld\n",res); }