#include "bits/stdc++.h" using namespace std; #define int long long #define rep(i,n) for(int i=0;i #define all(a) a.begin(),a.end() typedef pair P; const long long mod=998244353; const long long inf=1ll<<61; const int maxN=100; int a[105]; int dp[102][102][1024]; signed main(){ int n,k;cin>>n>>k; rep(i,n)cin>>a[i]; dp[0][0][0]=1; rep(i,n){ rep(j,k+1){ rep(l,1<<10){ if(!dp[i][j][l])continue; dp[i+1][j][l]+=dp[i][j][l]; dp[i+1][j][l]%=mod; if(!(l&a[i])){ dp[i+1][j+1][l|a[i]]+=dp[i][j][l]; dp[i+1][j+1][l|a[i]]%=mod; } } } } int sum=0; rep(i,1<<10)sum+=dp[n][k][i]; cout<