#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=144499999999994; ll mod=998244353; int main(){ ll n,k; cin >> n >> k; if (k>20) { cout << 0 << endl; return 0; } vector>dp(1024,vector(k+1,0)); vectormemo(1024,0); for (ll i = 0; i < n; i++) { ll a; cin >> a; memo[a]+=1; } dp[0][0]=1; for (ll i = 0; i < 1024; i++) { if (memo[i]==0) { continue; } for (ll j = k-1; j >=0; j--) { for (ll l = 0; l <1024; l++) { if (dp[l][j]==0) { continue; } ll x=l; x^=i; if (x==l+i) { dp[x][j+1]+=(dp[l][j]*memo[i])%mod; dp[x][j+1]%=mod; } } } } ll ans=0; for (ll i = 0; i < 1024; i++) { ans+=dp[i][k]; ans%=mod; } cout << ans << endl; }