#if loc||local #define _GLIBCXX_DEBUG #endif #include using namespace std; #define rep(i,n) for(ll i=0;i<(n);++i) using ll = int_fast64_t; using pll = pair; constexpr ll INF = 1LL<<60; constexpr ll MOD = 1e9+7; template bool chmax(T &a,const T &b){if(a bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}return 0;} #if loc||local templatevoid dump(T&& t){cerr< void dump(T&& h, Ts&&... t){cerr<(t)...);} #else void dump(){} template void dump(T&& h, Ts&&... t){} #endif template istream &operator>>(istream&is,vector&v){for(auto &elemnt:v)is>>elemnt;return is;} template istream &operator>>(istream&is,pair&p){is>>p.first>>p.second;return is;} template ostream &operator<<(ostream& os,vectorconst& v){for(auto const& vi:v)os< ostream &operator<<(ostream& os,pairconst& p){os<vector vec(size_t a){return vector(a);} templateauto vec(size_t a, Ts... ts){return vector(ts...))>(a, vec(ts...));} template struct mod_int{ int64_t val; constexpr mod_int():val(0){} constexpr mod_int(int64_t x)noexcept:val(x>=0?x%MOD:(MOD-(-x)%MOD)%MOD){} constexpr int64_t value()const noexcept{return val;} constexpr int64_t get_MOD()const noexcept{return MOD;} constexpr mod_int operator+(mod_int const& rhs){ return mod_int(*this)+=rhs; } constexpr mod_int operator-(mod_int const& rhs){ return mod_int(*this)-=rhs; } constexpr mod_int operator*(mod_int const& rhs){ return mod_int(*this)*=rhs; } constexpr mod_int operator/(mod_int const& rhs){ return mod_int(*this)/=rhs; } constexpr mod_int &operator+=(mod_int const& rhs)noexcept{ val += rhs.val; if(val>=MOD)val-=MOD; return *this; } constexpr mod_int &operator-=(mod_int const& rhs)noexcept{ if(val(mod_int const& rhs)const{ return val>rhs.val; } constexpr bool operator<=(mod_int const& rhs)const{ return !(val>rhs.val); } constexpr bool operator>=(mod_int const& rhs)const{ return !(val>(std::istream& is, mod_int & mi){ int64_t t=0;is>>t; mi = mod_int(t); return is; } constexpr mod_int inverse(){ int64_t a=val,b=MOD,u=1,v=0,t=0; while(b>0){ t=a/b; std::swap(a-=t*b,b); std::swap(u-=t*v,v); } return mod_int(u); } constexpr mod_int mpow(int64_t n)const{ mod_int res(1),e(*this); while(n){ if(n&1)res*=e; e*=e; n>>=1; } return res; } }; using mint = mod_int<119<<23|1>; mint mpow(int64_t p,int64_t n){ mint res=1; mint e = p; while(n){ if(n&1)res*=e; e*=e; n>>=1; } return res; } signed main(){ cin.tie(0); ios::sync_with_stdio(false); int n,k; cin>>n>>k; vector a(n); cin>>a; if(k>10){ cout<<0<>(k+1); auto dp2 = vector>(k+1); dp1[0][0] = 1; rep(i,n){ //dp2 = dp1; rep(j,k)for(auto&[s,v]:dp1[j]){ if((s+a[i])==(s^a[i]))dp1[j+1][s^a[i]] += v; } //swap(dp1,dp2); } mint ans = 0; for(auto&[s,v]:dp1[k])ans+=v; cout<<(ans)<