#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include using namespace std; const ll MOD=998244353; ll dp[11][1024]; int main(){ ll n,k; cin>>n>>k; vector A(1024); ll x; rep(i,n){ cin>>x; A[x]++; } dp[0][0]=1; rep(i,10){ rep(j,1024){ for(int l=j+1;l<1024;l++){ if(j+l==(j^l) && j+l<1024) dp[i+1][j+l]=(dp[i+1][j+l]+dp[i][j]*A[l]%MOD)%MOD; } } } ll ans=0; rep(i,1024) ans=(ans+dp[k][i])%MOD; cout<