#include <cstdio>
#include <algorithm>
using namespace std;
template<typename T>
T read(){
char c=getchar();T x=0;
while(c<48||c>57) c=getchar();
do x=(x<<1)+(x<<3)+(c^48),c=getchar();
while(c>=48&&c<=57);
return x;
}
typedef unsigned long long ll;
typedef __uint128_t lll;
const lll Lim=(lll(1)<<63);
const int P1=998244353;
const int P2=1000000007;
const int P3=1000000009;
const lll PPP=(lll)P1*P2*P3;
int qp(int a,int b,int p){
int res=1;
while(b){
if(b&1) res=(ll)res*a%p;
a=(ll)a*a%p;b>>=1;
}
return res;
}
struct mint{
int x1,x2,x3;
mint(int X=0):x1(X),x2(X),x3(X){}
mint(int X1,int X2,int X3):x1(X1),x2(X2),x3(X3){}
friend mint operator+(const mint a,const mint b){
mint res(a.x1+b.x1,a.x2+b.x2,a.x3+b.x3);
if(res.x1>=P1) res.x1-=P1;
if(res.x2>=P2) res.x2-=P2;
if(res.x3>=P3) res.x3-=P3;
return res;
}
friend mint operator-(const mint a,const mint b){
mint res(a.x1-b.x1,a.x2-b.x2,a.x3-b.x3);
if(res.x1<0) res.x1+=P1;
if(res.x2<0) res.x2+=P2;
if(res.x3<0) res.x3+=P3;
return res;
}
friend mint operator*(const mint a,const mint b){
return mint((ll)a.x1*b.x1%P1,(ll)a.x2*b.x2%P2,(ll)a.x3*b.x3%P3);
}
void operator+=(const mint a){*this=*this+a;}
void tohalf(){
if(x1&1) x1+=P1;
if(x2&1) x2+=P2;
if(x3&1) x3+=P3;
x1>>=1;
x2>>=1;
x3>>=1;
}
};
int n,k,mx;
ll a[103];
ll p[64];
void ins(ll x){
for(int i=0;i<64;++i)
if(x>>i&1){
if(p[i]) x^=p[i];
else{p[i]=x;break;}
}
}
mint pw[10003];
int fac;
int stk[10],tp;
mint dp[32],tdp[32];
mint calc(){
for(int s=1;s<(1<<tp);++s) dp[s]=0;
dp[0]=1;
for(int i=0;i<n;++i){
int num=0;
for(int j=0;j<tp;++j)
if(a[i]>>stk[j]&1) num|=(1<<j);
for(int s=0;s<(1<<tp);++s)
tdp[s]=dp[s],dp[s]=0;
for(int s=0;s<(1<<tp);++s){
dp[s]+=tdp[s];
dp[s^num]+=tdp[s];
}
}
return dp[(1<<tp)-1];
}
mint res;
void dfs(int x,int sum,int coe,int tot){
stk[tp++]=x;
for(int i=1;i<=sum;++i){
coe/=i;tot+=x;
if(i<sum) for(int j=x+1;j<=mx;++j) dfs(j,sum-i,coe,tot);
else res+=coe*calc()*pw[tot];
}
--tp;
}
int main(){
n=read<int>();k=read<int>();
for(int i=1;i<=n;++i) ins(read<ll>());
n=0;
for(int i=0;i<64;++i) if(p[i]) a[n++]=p[i];
for(int i=0;i<n;++i){
int t=__lg(a[i]);
if(t>mx) mx=t;
}
pw[0]=1;
for(int i=1;i<=10000;++i) pw[i]=pw[i-1]+pw[i-1];
fac=1;
for(int i=1;i<=k;++i) fac=fac*i;
for(int i=0;i<=mx;++i) dfs(i,k,fac,0);
for(int i=0;i<n;++i) res.tohalf();
lll t1=(lll)res.x1*P2%PPP*P3%PPP*qp((ll)P2*P3%P1,P1-2,P1)%PPP;
lll t2=(lll)res.x2*P1%PPP*P3%PPP*qp((ll)P1*P3%P2,P2-2,P2)%PPP;
lll t3=(lll)res.x3*P1%PPP*P2%PPP*qp((ll)P1*P2%P3,P3-2,P3)%PPP;
lll t=(t1+t2+t3)%PPP;
if(t<=Lim) printf("%lld\n",(ll)t);
else{
t+=t;if(t>=PPP) t-=PPP;
printf("%lld.5\n",(ll)((t-1)>>1));
}
return 0;
}