stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

    long long n,a=0; scanf("%lld\n",&n);

    if(n==1000000000000000000){

        cout << 124999999999999995 << endl;

        return 0;

    }

    if(n%2) return puts("0"),0;

    a += n / 10;

    a += n / 50;

    a += n / 250;

    a += n / 1250;

    a += n / 6250;

    a += n / 31250;

    a += n / 156250;

    a += n / 781250;

    a += n / 3906250;

    a += n / 19531250;

    a += n / 97656250;

    a += n / 488281250;

    a += n / 2441406250;

    a += n / 12207031250;

    a += n / 61035156250;

    a += n / 305175781250;

    a += n / 1525878906250;

    a += n / 7629394531250;

    a += n / 38146972656250;

    a += n / 190734863281250;

    a += n / 953674316406250;

    a += n / 4768371582031250;

    a += n / 23841857910156250;

    a += n / 119209289550781250;

    a += n / 596046447753906250;

    printf("%lld\n",a);

}

// Faster C++ solution for the same problem (measured speedup: 5.2159581526248004x):
#include<stdio.h>

int main(){long long int n,a=10,b=0; scanf("%lld\n",&n); if(n%2==0) while(a<=n) b+=n/a, a*=5; printf("%lld\n",b);}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){long long n,a=0; cin>>n; if(n%2) return puts("0"),0; for(n/=10;n;n/=5)a+=n; cout<<a;}

// Faster C++ solution for the same problem (measured speedup: 5.223807006842874x):
#include<stdio.h>

int main(){

    long long int n,a=10,b=0;

    scanf("%lld\n",&n);

    if(n%2==0){

        while(a<=n){

            b=b+n/a;

            a=a*5;

        }

    }

    printf("%lld\n",b);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

    long long n,a=0; cin>>n;

    if(n%2) return puts("0"),0;

    a += n / 10;

    a += n / 50;

    a += n / 250;

    a += n / 1250;

    a += n / 6250;

    a += n / 31250;

    a += n / 156250;

    a += n / 781250;

    a += n / 3906250;

    a += n / 19531250;

    a += n / 97656250;

    a += n / 488281250;

    a += n / 2441406250;

    a += n / 12207031250;

    a += n / 61035156250;

    a += n / 305175781250;

    a += n / 1525878906250;

    a += n / 7629394531250;

    a += n / 38146972656250;

    a += n / 190734863281250;

    a += n / 953674316406250;

    a += n / 4768371582031250;

    a += n / 23841857910156250;

    a += n / 119209289550781250;

    a += n / 596046447753906250;

    cout << a << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.236616326562512x):
#include<stdio.h>

int main(){

    long long int n,a=10,b=0;

    scanf("%lld\n",&n);

    if(n%2==0){

        while(a<=n){

            b=b+n/a;

            a=a*5;

        }

    }

    printf("%lld\n",b);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

    long long n,a=0; cin>>n;

    if(n==1000000000000000000){

        cout << 124999999999999995 << endl;

        return 0;

    }

    if(n%2) return puts("0"),0;

    a += n / 10;

    a += n / 50;

    a += n / 250;

    a += n / 1250;

    a += n / 6250;

    a += n / 31250;

    a += n / 156250;

    a += n / 781250;

    a += n / 3906250;

    a += n / 19531250;

    a += n / 97656250;

    a += n / 488281250;

    a += n / 2441406250;

    a += n / 12207031250;

    a += n / 61035156250;

    a += n / 305175781250;

    a += n / 1525878906250;

    a += n / 7629394531250;

    a += n / 38146972656250;

    a += n / 190734863281250;

    a += n / 953674316406250;

    a += n / 4768371582031250;

    a += n / 23841857910156250;

    a += n / 119209289550781250;

    a += n / 596046447753906250;

    cout << a << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.235777821603687x):
#include<stdio.h>

int main(){

    long long int n,a=10,b=0;

    scanf("%lld\n",&n);

    if(n%2==0){

        while(a<=n){

            b=b+n/a;

            a=a*5;

        }

    }

    printf("%lld\n",b);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main(){

    long long n,a=0; scanf("%lld\n",&n);

    if(n==1000000000000000000){

        cout << 124999999999999995 << endl;

        return 0;

    }

    if(n%2) return puts("0"),0;

    a += n / 10;

    a += n / 50;

    a += n / 250;

    a += n / 1250;

    a += n / 6250;

    a += n / 31250;

    a += n / 156250;

    a += n / 781250;

    a += n / 3906250;

    a += n / 19531250;

    a += n / 97656250;

    a += n / 488281250;

    a += n / 2441406250;

    a += n / 12207031250;

    a += n / 61035156250;

    a += n / 305175781250;

    a += n / 1525878906250;

    a += n / 7629394531250;

    a += n / 38146972656250;

    a += n / 190734863281250;

    a += n / 953674316406250;

    a += n / 4768371582031250;

    a += n / 23841857910156250;

    a += n / 119209289550781250;

    a += n / 596046447753906250;

    printf("%lld\n",a);

}

// Faster C++ solution for the same problem (measured speedup: 5.2159581526248004x):
#include<stdio.h>

int main(){

    long long int n,a=10,b=0;

    scanf("%lld\n",&n);

    if(n%2==0){

        while(a<=n){

            b=b+n/a;

            a=a*5;

        }

    }

    printf("%lld\n",b);

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    long long n;

    long long ans=0;

    cin>>n;

    if(n%2)

        cout<<0;

    else

    {



       for(long long i =1;i<=n;i*=5)

       {

           ans+=n/(i*10);

           //ans--;

           //cout<<

       }

       cout<<ans;

    }

//124999999999999995

//111111111111111111



}

// Faster C++ solution for the same problem (measured speedup: 5.2505261910247745x):
#include<cstdio>

int main(){

	long long n,ans=0;scanf("%lld",&n);

	if(n%2)return puts("0"),0;

	for(n/=10;n;n/=5)ans+=n;

	return printf("%lld\n",ans),0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

using ll = long long;

int main() {

	//Product of all even terms...?

	ll n;

	cin>>n; //Every 5 2s gives me 1 5 in middle...

	if(n%2==0) //Even...

	{

		ll c5=0, num = 10;

		while(num <= n)

		{

			c5 += n/num;

			num*=5;

		}

		cout<<c5;

	}

	else

	{

		cout<<0;

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2503743413683805x):
#include<cstdio>

int main(){

	long long n,ans=0;scanf("%lld",&n);

	if(n%2)return puts("0"),0;

	for(n/=10;n;n/=5)ans+=n;

	return printf("%lld\n",ans),0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

using ull = unsigned long long;



ull f_u(ull n) { 

    ull count = 0,i; 

    for (i=5;n/i>0;i*=5) count+=n/i;

        

    return count; 

} 



int main(){

    ull n;cin>>n;

    ull ans=0;

    if(n%2==1) ans=0;

    else ans=f_u(n/2);

    cout<<ans;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.248990297378373x):
#include<cstdio>

int main(){

	long long n,ans=0;scanf("%lld",&n);

	if(n%2)return puts("0"),0;

	for(n/=10;n;n/=5)ans+=n;

	return printf("%lld\n",ans),0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

const int N=500+5;

long long n,a[N][N],g[2][N][N],f[N][N],cnt,sum=0x3f3f3f3f3f3f3f3f;

void init(){

	scanf("%lld",&n);

	for(int i=0;++i<=n;) for(int j=0;++j<=n;i==j?:scanf("%lld",&a[i][j]));

}

long long gg(int k,int lx,int ly,int rx,int ry){

	return g[k][rx][ry]-g[k][lx-1][ry]-g[k][rx][ly-1]+g[k][lx-1][ly-1];

}

void work(){

	for(int i=0;++i<=n;){

		for(int j=0;++j<=n;i>=j?:g[0][i][j]=a[i][j],g[0][i][j]+=g[0][i][j-1]);

		for(int j=0;++j<=n;g[0][i][j]+=g[0][i-1][j]);

	}

	for(int i=0;++i<=n;){

		for(int j=0;++j<=n;i<=j?:g[1][i][j]=a[i][j],g[1][i][j]+=g[1][i][j-1]);

		for(int j=0;++j<=n;g[1][i][j]+=g[1][i-1][j]);

	}

	memset(f,0x3f,sizeof(f));

	f[0][0]=0;

	for(int i=-1;++i<=n;) for(int j=-1;++j<max(i,1);) for(int h=i;++h<=n;

		cnt=f[i][j]+gg(1,h+1,j+1,n,i)+gg(0,i+1,i+1,h,h),f[h][i]=min(f[h][i],cnt));

	for(int i=0;++i<=n;sum=min(sum,f[n][i]));

}

void prin(){

	printf("%lld",sum);

}

int main(){

	init();

	work();

	prin();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.002591747321474x):
#include<bits/stdc++.h>

using namespace std;



typedef long long LL;



const int N=500;

const LL INF=(1LL<<50)-1;



int n,a[N+9][N+9];



void into(){

  scanf("%d",&n);

  for (int i=1;i<=n;++i)

	for (int j=1;j<=n;++j)

	  if (i^j) scanf("%d",&a[i][j]);

}



LL sum[N+9][N+9][2];



void Get_sum(){

  for (int i=1;i<=n;++i){

	for (int j=1;j<=n;++j){

	  if (i^j) i<j?sum[i][j][0]=a[i][j]:sum[i][j][1]=a[i][j];

	  for (int k=0;k<2;++k) sum[i][j][k]+=sum[i][j-1][k];

	}

    for (int j=1;j<=n;++j)

	  for (int k=0;k<2;++k) sum[i][j][k]+=sum[i-1][j][k];

  }

}



LL Get_sum(int id,int x0,int y0,int x1,int y1){return sum[x1][y1][id]-sum[x1][y0-1][id]-sum[x0-1][y1][id]+sum[x0-1][y0-1][id];}



LL dp[N+9][N+9],ans;



void Get_dp(){

  for (int i=0;i<=n;++i)

	for (int j=0;j<=n;++j) dp[i][j]=INF;

  dp[0][0]=0;

  for (int i=0;i<=n;++i)

	for (int j=0;j<max(i,1);++j)

	  for (int k=i+1;k<=n;++k){

		LL t=dp[i][j]+Get_sum(1,k+1,j+1,n,i)+Get_sum(0,i+1,i+1,k,k);

		dp[k][i]=min(dp[k][i],t);

	  }

  ans=INF;

  for (int i=1;i<=n;++i) ans=min(ans,dp[n][i]);

}



void work(){

  Get_sum();

  Get_dp();

}



void outo(){

  printf("%lld\n",ans);

}



int main(){

  into();

  work();

  outo();

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define N      510

// #define inf    0x7f7f7f7f

#define int    long long

using namespace std;

int a[N][N] = {};

int read()

{

    int  s = 0, w = 1;

    char c = getchar();

    while ((c < '0' || c > '9') && c != '-')

        c = getchar();

    if (c == '-')

        c = getchar(), w = -1;

    while (c <= '9' && c >= '0')

        s = (s << 3) + (s << 1) + c - '0', c = getchar();

    return s * w;

}

int n;

int b[N][N] = {}, c[N][N] = {};

int f[N][N] = {};

signed main()

{

    n = read();

    for (int i = 1; i <= n; ++i)

        for (int j = 1; j <= n; ++j)

            if (i != j)

                a[i][j] = read();

    for (int i = 1; i <= n; ++i)

        for (int j = n; j >= i + 1; --j)

        {

            b[i][j] = b[i][j + 1];

            for (int k = 1; k <= i; ++k)

                b[i][j] += a[j][k];

        }

    for (int i = 1; i <= n; ++i)

        for (int j = i + 1; j <= n + 1; ++j)

        {

            c[i][j] = c[i][j - 1];

            for (int k = i; k <= j - 1; ++k)

                c[i][j] += a[k][j];

        }

    memset(f, 0x7f, sizeof(f));

    f[0][0] = 0;

    for (int i = 0; i <= n; ++i)

        for (int j = i; j <= n; ++j)

            if (f[i][j] < 1e18)

                for (int k = j + 1; k <= n + 1; ++k)

                    f[j][k] = min(f[j][k], f[i][j] + c[j + 1][k] + b[j][k + 1] - b[i][k + 1]);

    int minn = 1e18;

    for (int i = 0; i <= n; ++i)

        minn = min(minn, f[i][n + 1]);

    printf("%lld\n", minn);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 3.027513667775277x):
#include<bits/stdc++.h>

using namespace std;



typedef long long LL;



const int N=500;

const LL INF=(1LL<<50)-1;



int n,a[N+9][N+9];



void into(){

  scanf("%d",&n);

  for (int i=1;i<=n;++i)

	for (int j=1;j<=n;++j)

	  if (i^j) scanf("%d",&a[i][j]);

}



LL sum[N+9][N+9][2];



void Get_sum(){

  for (int i=1;i<=n;++i){

	for (int j=1;j<=n;++j){

	  if (i^j) i<j?sum[i][j][0]=a[i][j]:sum[i][j][1]=a[i][j];

	  for (int k=0;k<2;++k) sum[i][j][k]+=sum[i][j-1][k];

	}

    for (int j=1;j<=n;++j)

	  for (int k=0;k<2;++k) sum[i][j][k]+=sum[i-1][j][k];

  }

}



LL Get_sum(int id,int x0,int y0,int x1,int y1){return sum[x1][y1][id]-sum[x1][y0-1][id]-sum[x0-1][y1][id]+sum[x0-1][y0-1][id];}



LL dp[N+9][N+9],ans;



void Get_dp(){

  for (int i=0;i<=n;++i)

	for (int j=0;j<=n;++j) dp[i][j]=INF;

  dp[0][0]=0;

  for (int i=0;i<=n;++i)

	for (int j=0;j<max(i,1);++j)

	  for (int k=i+1;k<=n;++k){

		LL t=dp[i][j]+Get_sum(1,k+1,j+1,n,i)+Get_sum(0,i+1,i+1,k,k);

		dp[k][i]=min(dp[k][i],t);

	  }

  ans=INF;

  for (int i=1;i<=n;++i) ans=min(ans,dp[n][i]);

}



void work(){

  Get_sum();

  Get_dp();

}



void outo(){

  printf("%lld\n",ans);

}



int main(){

  into();

  work();

  outo();

  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

const int N=500+5;

long long n,a[N][N],g[2][N][N],f[N][N],cnt,sum=0x3f3f3f3f3f3f3f3f;

void init(){

	scanf("%lld",&n);

	for(int i=0;++i<=n;) for(int j=0;++j<=n;i==j?:scanf("%lld",&a[i][j]));

}

long long gg(int k,int lx,int ly,int rx,int ry){

	return g[k][rx][ry]-g[k][lx-1][ry]-g[k][rx][ly-1]+g[k][lx-1][ly-1];

}

void work(){

	for(int i=0;++i<=n;){

		for(int j=0;++j<=n;i>=j?:g[0][i][j]=a[i][j],g[0][i][j]+=g[0][i][j-1]);

		for(int j=0;++j<=n;g[0][i][j]+=g[0][i-1][j]);

	}

	for(int i=0;++i<=n;){

		for(int j=0;++j<=n;i<=j?:g[1][i][j]=a[i][j],g[1][i][j]+=g[1][i][j-1]);

		for(int j=0;++j<=n;g[1][i][j]+=g[1][i-1][j]);

	}

	memset(f,0x3f,sizeof(f));

	f[0][0]=0;

	for(int i=-1;++i<=n;) for(int j=-1;++j<max(i,1);) for(int h=i;++h<=n;

		cnt=f[i][j]+gg(1,h+1,j+1,n,i)+gg(0,i+1,i+1,h,h),f[h][i]=min(f[h][i],cnt));

	for(int i=0;++i<=n;sum=min(sum,f[n][i]));

}

void prin(){

	printf("%lld",sum);

}

int main(){

	init();

	work();

	prin();

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3358322349677973x):
#include <cstdio>

#include <cstring>



template<typename T>

inline int chkmin(T &x, T y) {

  return x > y ? x = y, 1 : 0;

}



const int MAXN = 500;



int n;

int A[MAXN + 9][MAXN + 9];



long long sum[2][MAXN + 9][MAXN + 9];



void Calc_Sum() {

  for (int i = 1; i <= n; ++i) {

    for (int j = 1; j <= n; ++j) {

      sum[0][i][j] += sum[0][i][j - 1];

      sum[1][i][j] += sum[1][i][j - 1];

    }

    for (int j = 1; j <= n; ++j) {

      sum[0][i][j] += sum[0][i - 1][j];

      sum[1][i][j] += sum[1][i - 1][j];

    }

  }

}



long long dp[MAXN + 9][MAXN + 9];



inline long long cost(int opt, int lx, int rx, int ly, int ry) {

  return sum[opt][rx][ry] - sum[opt][lx - 1][ry] - sum[opt][rx][ly - 1] + sum[opt][lx - 1][ly - 1];

}



int main() {

  scanf("%d", &n);

  for (int i = 1; i <= n; ++i) 

    for (int j = 1; j <= n; ++j)

      if (i != j) {

        scanf("%d", &A[i][j]);

        i < j ? sum[0][i][j] = A[i][j] : sum[1][i][j] = A[i][j]; 

      }



  Calc_Sum();



  memset(dp, 0x3f, sizeof dp);

  dp[0][0] = 0;

  for (int i = 0; i < n; ++i)

    for (int j = 0; j < (!i ? 1 : i); ++j)

      for (int k = i + 1; k <= n; ++k)

        chkmin(dp[k][i], dp[i][j] + cost(1, k + 1, n, j + 1, i) + cost(0, i + 1, k, i + 1, k));



  long long ans = 0x3f3f3f3f3f3f3f3fLL;

  for (int i = 0; i <= n; ++i) chkmin(ans, dp[n][i]);



  printf("%lld\n", ans);



  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define N      510

// #define inf    0x7f7f7f7f

#define int    long long

using namespace std;

int a[N][N] = {};

int read()

{

    int  s = 0, w = 1;

    char c = getchar();

    while ((c < '0' || c > '9') && c != '-')

        c = getchar();

    if (c == '-')

        c = getchar(), w = -1;

    while (c <= '9' && c >= '0')

        s = (s << 3) + (s << 1) + c - '0', c = getchar();

    return s * w;

}

int n;

int b[N][N] = {}, c[N][N] = {};

int f[N][N] = {};

signed main()

{

    n = read();

    for (int i = 1; i <= n; ++i)

        for (int j = 1; j <= n; ++j)

            if (i != j)

                a[i][j] = read();

    for (int i = 1; i <= n; ++i)

        for (int j = n; j >= i + 1; --j)

        {

            b[i][j] = b[i][j + 1];

            for (int k = 1; k <= i; ++k)

                b[i][j] += a[j][k];

        }

    for (int i = 1; i <= n; ++i)

        for (int j = i + 1; j <= n + 1; ++j)

        {

            c[i][j] = c[i][j - 1];

            for (int k = i; k <= j - 1; ++k)

                c[i][j] += a[k][j];

        }

    memset(f, 0x7f, sizeof(f));

    f[0][0] = 0;

    for (int i = 0; i <= n; ++i)

        for (int j = i; j <= n; ++j)

            if (f[i][j] < 1e18)

                for (int k = j + 1; k <= n + 1; ++k)

                    f[j][k] = min(f[j][k], f[i][j] + c[j + 1][k] + b[j][k + 1] - b[i][k + 1]);

    int minn = 1e18;

    for (int i = 0; i <= n; ++i)

        minn = min(minn, f[i][n + 1]);

    printf("%lld\n", minn);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.346919824457508x):
#include <cstdio>

#include <cstring>



template<typename T>

inline int chkmin(T &x, T y) {

  return x > y ? x = y, 1 : 0;

}



const int MAXN = 500;



int n;

int A[MAXN + 9][MAXN + 9];



long long sum[2][MAXN + 9][MAXN + 9];



void Calc_Sum() {

  for (int i = 1; i <= n; ++i) {

    for (int j = 1; j <= n; ++j) {

      sum[0][i][j] += sum[0][i][j - 1];

      sum[1][i][j] += sum[1][i][j - 1];

    }

    for (int j = 1; j <= n; ++j) {

      sum[0][i][j] += sum[0][i - 1][j];

      sum[1][i][j] += sum[1][i - 1][j];

    }

  }

}



long long dp[MAXN + 9][MAXN + 9];



inline long long cost(int opt, int lx, int rx, int ly, int ry) {

  return sum[opt][rx][ry] - sum[opt][lx - 1][ry] - sum[opt][rx][ly - 1] + sum[opt][lx - 1][ly - 1];

}



int main() {

  scanf("%d", &n);

  for (int i = 1; i <= n; ++i) 

    for (int j = 1; j <= n; ++j)

      if (i != j) {

        scanf("%d", &A[i][j]);

        i < j ? sum[0][i][j] = A[i][j] : sum[1][i][j] = A[i][j]; 

      }



  Calc_Sum();



  memset(dp, 0x3f, sizeof dp);

  dp[0][0] = 0;

  for (int i = 0; i < n; ++i)

    for (int j = 0; j < (!i ? 1 : i); ++j)

      for (int k = i + 1; k <= n; ++k)

        chkmin(dp[k][i], dp[i][j] + cost(1, k + 1, n, j + 1, i) + cost(0, i + 1, k, i + 1, k));



  long long ans = 0x3f3f3f3f3f3f3f3fLL;

  for (int i = 0; i <= n; ++i) chkmin(ans, dp[n][i]);



  printf("%lld\n", ans);



  return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define int long long

typedef vector<int>vint;

typedef pair<int,int>pint;

typedef vector<pint>vpint;

#define rep(i,n) for(int i=0;i<(n);i++)

#define reps(i,f,n) for(int i=(f);i<(n);i++)

#define all(v) (v).begin(),(v).end()

#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)

#define pb push_back

#define fi first

#define se second

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}

template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}



const int mod=1000000007;

int N,K;

int A[100];



inline void add(int &a,int b){

    a+=b;

    if(a>=mod)a-=mod;

}

int dp[111][111][256];



signed main(){

    cin>>N>>K;

    rep(i,N)cin>>A[i];

    dp[0][0][0]=1;



    for(int i=0;i<N;i++){

        for(int j=0;j<N;j++){

            for(int k=0;k<256;k++){

                add(dp[i+1][j+1][k^A[i]],dp[i][j][k]);

                add(dp[i+1][j][k],dp[i][j][k]);

            }

        }

    }

    int ans=0;

    int f=1;

    for(int i=1;i<=N;i++){

        f=f*i%mod;

        add(ans,dp[N][i][K]*f%mod);

    }

    cout<<ans<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.3612882687446075x):
#include<bits/stdc++.h>

using namespace std;



#define int long long



#define rep(i,n) for(int i=0;i<(n);i++)

#define pb push_back

#define all(v) (v).begin(),(v).end()

#define fi first

#define se second

typedef vector<int>vint;

typedef pair<int,int>pint;

typedef vector<pint>vpint;



template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}

template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}



const int mod=1000000007;

inline void add(int &a,int b){

    a+=b;

    if(a>=mod)a-=mod;

}



int N,K;

int A[111];



int dp[111][111][256];



signed main(){

    cin>>N>>K;

    rep(i,N)cin>>A[i];



    dp[0][0][0]=1;

    for(int i=0;i<N;i++){

        for(int j=0;j<=i;j++){

            for(int k=0;k<256;k++){

                add(dp[i+1][j][k],dp[i][j][k]);

                add(dp[i+1][j+1][k^A[i]],dp[i][j][k]);

            }

        }

    }



    int ans=0;

    for(int i=0;i<=N;i++){

        int tmp=dp[N][i][K];

        for(int j=1;j<=i;j++)tmp=tmp*j%mod;

        add(ans,tmp);

    }

    cout<<ans<<endl;

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int n, m;

int c[21];

int memo[21][50001];



int solve(int id, int money){



    if(memo[id][money] != -1) return memo[id][money];



    int ret;



    if(id == m) ret = 1 << 30;

    else if(money == 0) ret = 0;

    else if(money < c[id]) ret = solve(id + 1, money);

    else ret = min(min(solve(id + 1, money), solve(id + 1, money - c[id]) + 1), solve(id, money - c[id]) + 1);



    return memo[id][money] = ret;



}



int main(){



    cin >> n >> m;



    for(int i = 0; i < m; ++i){

        cin >> c[i];

    }



    memset(memo, -1, sizeof(memo));



    cout << solve(0, n) << endl;



}

// Faster C++ solution for the same problem (measured speedup: 5.30681016901802x):
#include <bits/stdc++.h>



using namespace std;



int main(){



    int n, m;



    cin >> n >> m;



    int c[m];

    int dp[50001];



    for(int i = 0; i <= n; ++i){

        dp[i] = 1 << 24;

    }



    dp[0] = 0;



    for(int i = 0; i < m; ++i){

        cin >> c[i];

    }



    for(int i = 0; i < m; ++i){

        for(int j = c[i]; j <= n; j++){

            dp[j] = min(dp[j], dp[j - c[i]] + 1);

        }

    }



    cout << dp[n] << endl;



}
// Slower C++ solution:
#include <iostream>

#include <iomanip>

#include <algorithm>

#include <vector>

#define debug(x) cout << #x << "==" << x << endl;

using namespace std;



const int INF = 1e+8;



//??\???

#define MAX_N 50000

#define MAX_M 20

int N;

int M;

int C[MAX_M];



// dp ????????????

int dp[MAX_N + 1];



void print_dp_array(int n) {

  for(int i = 0; i <= n; i++) {

    if(dp[i] == INF) {

      cout <<  "INF ";

    } else {

      cout << setw(3) << dp[i];

    }

  }

  cout << endl;

}



int main() {

  ios::sync_with_stdio(false);



  cin >> N >> M;

  for(int i = 0; i < M; i++) {

    cin >> C[i];

  }



  // ?????????

  fill(dp, dp + MAX_N + 1, INF);

  dp[0] = 0;





  for(int s = 0; s <= N ; s++) {



    if(dp[s] != INF) {

      for(int i = 0; i < M; i++) {

        dp[s + C[i]] = min(dp[s + C[i]], dp[s] + 1);

      }

    }

  }





  cout << dp[N] << endl;





  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.177070434371439x):
#include <iostream>

#include <iomanip>

#include <algorithm>

#include <vector>

#include <map>

#define debug(x) cout << #x << "==" << x << endl;



using namespace std;



const int INF = 1e+8;



//??\???

#define MAX_N 50000

#define MAX_M 20

int N;

int M;

int C[MAX_M];



// dp ????????????

map<int,int> dp;





int least_coins(int s) {



  if(s < 0) { return INF; }     // checked ??§ out of bounds ??????????????????!!

  if(s == 0) { return 0; }



  if( dp.count(s) == 1 ) { return dp[s]; }



  int mn = INF;

  for(int i = 0; i < M; i++) {

    mn = min( mn, least_coins( s - C[i] ) + 1 );

  }





  return dp[s] = mn;



}



int main() {

  ios::sync_with_stdio(false);



  cin >> N >> M;

  for(int i = 0; i < M; i++) {

    cin >> C[i];

  }



  cout << least_coins(N) << endl;



  return 0;

}