#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) const long long MOD = 998244353; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; vector cnt(1024); REP (i, n) { int a; cin >> a; ++cnt[a]; } if (k > 10) { cout << 0 << endl; return 0; } vector > dp(11, vector(1024)); dp[0][0] = 1; for (int a = 1; a < 1024; a++) { for (int mask = 0; mask < 1024; mask++) { if ((mask & a) != a) continue; for (int i = 0; i < 10; i++) { dp[i+1][mask] += dp[i][mask^a] * cnt[a] % MOD; dp[i+1][mask] %= MOD; } } } long long ret = 0; for (int mask = 0; mask < 1024; mask++) (ret += dp[k][mask]) %= MOD; cout << ret << endl; return 0; }