long N=1024,A[1024],d[42][1024]={1},r;k,m,x,y,a,i,j,l;main(n){scanf("%d%d%d%d",&n,&m,&x,&y);for(;m--;)scanf("%d",&a),k+=(A[a]?0:++A[a]);for(;i<n;i++)for(j=0;j<N;j++){for(l=0;l<N;l++)d[i+1][j^l]+=A[l]*d[i][j];d[i+2][j]-=d[i][j]*(k-(i>0));}for(;x<N;x++)r+=(x<=y)*d[n][x];printf("%d",r%998244353);}