#include using namespace std; #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i ) #define rep(i,n) REP(i,0,n) int n, k, x, y, ans; set a; void dfs(int num, int val, int pre) { if(num == n){ ans += x<= val && val <= y; return; } for(auto e:a){ if(e!=pre)dfs(num+1,val^e,e); } } int main(){ cin>>n>>k>>x>>y; rep(i,k){ int p;cin>>p; a.insert(p); } dfs(0,0,-1); cout<