stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    string w;

    getline(cin,w);

    int len=w.size();

    int a[26]={0};

    int T=0;

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

        a[w[i]-97]++;

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

        if(a[i]%2!=0){

           T=1;

         break;

        }

    if(T==0)

        printf("Yes\n");

    else

        printf("No\n");



}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

#include <cstring>

#define INF 0x3f3f3f3f

using namespace std;

int num[30];

char ar[105];



int main()

{

    while(~scanf(" %s",ar)){

        int len = strlen(ar);

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

            num[ar[i]-'a']++;

        }

        bool flag = true;

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

            if(num[i]%2 != 0){

                flag = false;

                break;

            }

        }

        if(flag){

            printf("Yes\n");

        }

        else

            printf("No\n");



    }

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
/*Bismillahir Rahmanir Rahim

->>Code by Ashraful Islam Paran

->>CUET,CSE

*/

#include <bits/stdc++.h>

using namespace std;

typedef int64_t ll;

typedef unsigned long long ull;

typedef vector<int> vi;

const int MX=2e5+5;

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

#define pb push_back

#define endl "\n"

#define yes cout<<"Yes"<<endl

#define no cout<<"No"<<endl



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.tie(NULL);



    string s;

    int a[MX]={0},p{0};

    cin>>s;

    f(i,0,s.size())

    {

        a[s[i]]++;

    }

    for(int i=97;i<=122;i++)

    {

        if(a[i]%2)

        {

            p=1;

        }

    }

    if(p)

    {

        no;

    }

    else

        yes;



    return 0;

}




// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

typedef long long ll;

#define endl "\n"



using namespace std;



//ll const N = 32000;

int cnt[26];



int main()

{

    string w;

    int flag = 0;



    cin >> w;



    for(int i = 0; i < w.size(); i++)

    {

        cnt[w[i] - 97]++;

    }





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

    {

        if(cnt[i] % 2 != 0)

        {

            flag++;

            break;

        }

    }



    if(flag == 0)printf("Yes\n");

    else printf("No\n");



    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):


#include<bits/stdc++.h>

#define lln long long int

#define llu unsigned lln

#define sc(n) scanf("%d",&n);

#define scl(n) scanf("%lld",&n);

#define scd(n) scanf("%lf",&n);

#define pf(res) printf("%d\n",res);

#define pfl(res) printf("%lld\n",res);

#define pfd(res) printf("%lf\n",res);

#define maxii 100005

using namespace std;

typedef pair<int,int> pii;

typedef pair<lln,lln> pll;

 vector<int> vi[maxii];

 vector<int>:: iterator child;

typedef vector<lln> vl;

typedef vector<pii> vii;

typedef vector<pll> vll;





int arr[maxii];

int arr2[maxii];

bool check[maxii];



bool dfs(int node,int c)

{

    check[node]=true;

    arr2[node]=c;

    for(int child=0;child<vi[node].size();child++)

    {

        if(check[vi[node][child]]==false)

        {

            if(dfs(vi[node][child],c^1)==false)

            {

                return false;

            }

        }

        else if(arr2[node]==arr2[vi[node][child]])

        {

            return false;

        }

        //else if()

    }

    return true;

}



int main()

{

   string a;

   cin>>a;

   int len=a.size();

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

   {

       arr[a[i]-'a']++;

   }

   int c=0;

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

   {

       if(arr[i]%2!=0)

       {

           c=1;

           break;

       }

   }

   if(c==0)

   {

       printf("Yes\n");

   }

   else cout<<"No";

}










// Optimized solution to the same problem (faster):
/// @author MUSTAFA MOGHAZY

#include<bits/stdc++.h>

using namespace std;

#define ll long long

int a [32+4];

int main()

{

 string s; cin>>s;

 for(int i=0; i<s.size(); ++i){

    ++a[ s[i] - 96];

 }

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

    if(a[i]%2==1){

        cout<<"No\n";

        return 0;

    }

 }

 cout<<"Yes\n";

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<cstdio>

#include<cstring>

#include<stdlib.h>

using namespace std;

const int N=1e4+50;

const int INF=0x3f3f3f;

char s[N];

int vis[N];

int main()

{

    scanf("%s",s);

    int len=strlen(s);

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

    {

        vis[(int)s[i]]++;

    }

    for(int i=97;i<=122;i++)

    {

        if(vis[i]%2!=0)

        {

            printf("No\n");

            return 0;

        }

    }

    printf("Yes\n");

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    char str[10000];

    int i,j,count=0,f,x,a[26]={0},c=0;

    scanf("%s",str);

    for(i=0;str[i]!='\0';i++)

    {

        if(str[i]>='a'&&str[i]<='z')

        {

            x=str[i]-'a';

            a[x]++;

        }

    }

    for(i=0;i<26;i++)

    {

        if(a[i]%2==0)

        {

            c++;

        }

    }

    if(c==26)

    {

        printf("Yes\n");

    }

    else

    {

        printf("No\n");

    }

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstring>

#include <cstdlib>

#include <cmath>

#include <algorithm>

#include <functional>

#include <vector>

#include <queue>

#include <stack>

#include <map>

#include <set>

#include <bitset>

#include <cassert>

#include <exception>

using namespace std;

typedef long long ll;

typedef unsigned long long ull;

typedef vector<int> vi;

typedef vector<ll> vll;

typedef vector<string> vs;

typedef pair<int,int> P;

#define rep(i,a,n) for(ll i = (a);i < (n);i++)

#define per(i,a,n) for(ll i = (a);i > (n);i--)

#define lep(i,a,n) for(ll i = (a);i <= (n);i++)

#define pel(i,a,n) for(ll i = (a);i >= (n);i--)

#define clr(a,b) memset((a),(b),sizeof(a))

#define pb push_back

#define mp make_pair

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

#define sz size()

#define print(X) cout << (X) << endl

const ll INF = 1e+9+7;

ll n,m,l;

string s,t;

ll d[100000],dp[100][100];



int main(){

  cin >> s;

  clr(d,0);

  rep(i,0,s.sz)d[s[i]-'a']++;

  s = "Yes";

  rep(i,0,26){

    if(d[i] % 2 != 0)s = "No";

  }

  print(s);

  return 0;

}

// Optimized solution to the same problem (faster):
#include <iostream>

#include <cstring>

#include <cstdlib>

#include <cmath>

#include <algorithm>

#include <functional>

#include <vector>

#include <queue>

#include <stack>

#include <map>

#include <set>

#include <bitset>

#include <cassert>

#include <exception>

using namespace std;

typedef long long ll;

typedef unsigned long long ull;

typedef pair<ll,ll> P;

typedef vector<int> vi;

typedef vector<ll> vll;

typedef vector<string> vs;

typedef vector<P> vp;

#define rep(i,a,n) for(ll i = (a);i < (n);i++)

#define per(i,a,n) for(ll i = (a);i > (n);i--)

#define lep(i,a,n) for(ll i = (a);i <= (n);i++)

#define pel(i,a,n) for(ll i = (a);i >= (n);i--)

#define clr(a,b) memset((a),(b),sizeof(a))

#define pb push_back

#define mp make_pair

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

#define sz size()

#define print(X) cout << (X) << endl

const ll INF = 1e+9+7;

ll n,m,l;

string s,t;

ll d[200010],dp[500][500];



int main(){

  cin >> s;

  rep(i,0,s.sz)d[s[i]-'a']++;

  l = 0;

  rep(i,0,26)if(d[i] % 2 != 0)l++;

  if(l != 0)puts("No");

  else puts("Yes");

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

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

#define pb(a) push_back(a)

#define mp(a,b) make_pair(a,b)

#define ALL(a) (a).begin(),(a).end()

#define F first

#define S second

typedef pair<int,int> PI;





int m,t,p,r;



int app[400][400];

int pena[400];





void solve(){

  memset(app,0,sizeof(app));

  memset(pena,0,sizeof(pena));  

  

  vector<int> sol(10000);

  

  rep(i,r){

    int mk,tk,pk,jk;

    cin >> mk >> tk >> pk >> jk;

    if(jk==0){

      pena[tk] += app[tk][pk]*20+mk;

      ++sol[tk];

    }else{

      ++app[tk][pk];

    }

  }



  vector<pair<PI,int> > team;

  

  rep(i,t){

    team.pb(mp(mp(-sol[i+1],pena[i+1]),-i-1));

  }



  

  sort(ALL(team));

  rep(i,t){

    if(i){

      if(team[i-1].F == team[i].F) cout << "=";

      else cout << ",";

    }

    cout << -team[i].S;

  }

  cout << endl;

}



int main(){

  while(cin >> m >> t >> p >> r && m) solve();

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <vector>

#include <algorithm>



using namespace std;



int a[50][2];

int b[50][10];



int main()

{

  while (1) {

    int m, t, p, r, i, j;

    vector <pair<int, pair<int, int> > > v;



    scanf("%d %d %d %d", &m, &t, &p, &r);



    if (m == 0 && t == 0 && p == 0 && r == 0) break;



    for (i = 0; i < t; i++) a[i][0] = a[i][1] = 0;

    for (i = 0; i < t; i++) {

      for (j = 0; j < p; j++) {

        b[i][j] = 0;

      }

    }



    for (i = 0; i < r; i++) {

      int m, t, p, j;



      scanf("%d %d %d %d", &m, &t, &p, &j);



      t--;

      p--;



      if (j == 0) {

        a[t][0]++;

        a[t][1] += b[t][p];

        a[t][1] += m;

      } else {

        b[t][p] += 20;

      }

    }



    for (i = 0; i < t; i++) v.push_back(make_pair(a[i][0], make_pair(-a[i][1], i + 1)));



    sort(v.begin(), v.end());

    reverse(v.begin(), v.end());



    printf("%d", v[0].second.second);



    for (i = 1; i < v.size(); i++) {

      if (v[i].first == v[i - 1].first && v[i].second.first == v[i - 1].second.first) {

        putchar('=');

      } else {

        putchar(',');

      }



      printf("%d", v[i].second.second);

    }



    puts("");

  }



  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <stdio.h>

#include <algorithm>

using namespace std;



int N, C, A[6], bc[1 << 5];

int P[333], Q[333], M[1<<5][1<<5], V;

long long prv[333][333];

long long nxt[333][333];



int main()

{

	scanf("%d %d", &N, &C);

	for (int i = 0; i < N; i++) scanf("%d", &A[i]);

	sort(A, A + N);



	int b = (1 << (N - 1));

	prv[0][A[N - 1] * N] = nxt[0][A[N - 1] * N] = 1;

	for (int i = 1; i < b; i++) bc[i] = bc[i - (i&(-i))] + 1;

	for (int i = 0; i < b; i++) for (int j = 0; j < b; j++) if (bc[i] == bc[j]) {

		P[V] = i; Q[V] = j;

		M[i][j] = V++;

	}

	for (int t = 0; t < N*C; t++) {

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

			int p = P[i], q = Q[i], d = t % N - 1;

			if (d < 0 || (q & (1 << d))) continue;

			for (int k = t; k <= N*C; k++) if (prv[i][k]) {

				for (int j = 0; j < N-1; j++) if (~p & (1 << j)) {

					int x = min(N*C, max(k, t + A[j] * N));

					nxt[M[p + (1 << j)][q + (1 << d)]][x] += prv[i][k];

				}

			}

		}

		for (int i = 0; i < V; i++) for (int k = 0; k <= N*C; k++) prv[i][k] = nxt[i][k];

	}



	double ans = prv[V-1][N*C];

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

		ans /= i;

		ans /= C;

	}



	printf("%.16lf\n", ans);



	return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#include <algorithm>

using namespace std;



int N, C, A[6], bc[1 << 5];

int P[333], Q[333], M[1 << 5][1 << 5], V;

long long D[333][333];



int main()

{

	scanf("%d %d", &N, &C);

	int L = N * C;

	for (int i = 0; i < N; i++) scanf("%d", &A[i]);

	sort(A, A + N);



	int b = (1 << (N - 1));

	D[0][A[N - 1] * N] = 1;

	for (int i = 1; i < b; i++) bc[i] = bc[i - (i&(-i))] + 1;

	for (int i = 0; i < b; i++) for (int j = 0; j < b; j++) if (bc[i] == bc[j]) {

		P[V] = i; Q[V] = j;

		M[i][j] = V++;

	}

	for (int t = 0; t < L; t++) {

		int d = t % N - 1;

		if (d >= 0) for (int i = V - 1; i >= 0; i--) {

			int p = P[i], q = Q[i];

			if (q & (1 << d)) continue;

			for (int j = 0; j < N - 1; j++) if (~p & (1 << j)) {

				int l = t + A[j] * N;

				long long *v = D[M[p + (1 << j)][q + (1 << d)]];

				for (int k = t; k <= L; k++) if (D[i][k]) {

					int x = min(L, max(k, l));

					v[x] += D[i][k];

				}

			}

		}

	}



	double ans = D[V - 1][L];

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

		ans /= i;

		ans /= C;

	}



	printf("%.16lf\n", ans);



	return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define N 510

int n,c,a[N],ct;

double r,f[N][(1<<7)];

int main(){

	cin>>n>>c;

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

		cin>>a[i];

	sort(a,a+n);

	do{

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

		f[a[n-1]*n][0]=1;

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

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

				for(int s=0;s<(1<<(n-1));s++)

					if(i%n&&!(s&(1<<(i%n-1)))&&f[j][s]){

						f[min(n*c,max(j,i+a[i%n-1]*n))][s+(1<<(i%n-1))]+=f[j][s];

					}

		r+=f[n*c][(1<<(n-1))-1];

		ct++;

	}while(next_permutation(a,a+n-1));

	printf("%.15lf",(double)r/ct/pow(c,n-1));

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

double z,f[500][50],t;

int n,c,a[10];

int main(){

    scanf("%d%d",&n,&c);

    for(int i=0;i<n;i++)scanf("%d",&a[i]);

    sort(a,a+n);

    do{

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

		f[n*a[n-1]][0]=1;

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

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

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

					if (i%n&&(k>>(i%n-1)&1)==0){

						f[min(max(j,i+n*a[i%n-1]),n*c)][k|(1<<(i%n-1))]+=f[j][k];

					}

				}

			}

		}

        z+=f[n*c][(1<<(n-1))-1];

		t++;

    }while(next_permutation(a,a+n-1));

    printf("%.15f\n",z/t/pow(c,n-1));

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int n,c,l[10];

double dp[500][(1<<7)],t,ans;

int main()

{

    cin>>n>>c; 

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

    cin>>l[i];

    sort(l,l+n);

    do

    {

        memset(dp,0,sizeof(dp));

        dp[l[n-1]*n][0]=1;

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

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

        for(int S=0;S<(1<<n-1);++S)

            if(i%n && !((S>>(i%n-1))&1))

                dp[min(n*c,max(j,i+l[i%n-1]*n))][S|(1<<(i%n-1))]+=dp[j][S];

        ans+=dp[n*c][(1<<n-1)-1];

        t++;

    }

    while(next_permutation(l,l+n-1));

    printf("%.15lf",(double)ans/t/pow(c,n-1));

    return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

double z,f[500][50],t;

int n,c,a[10];

int main(){

    scanf("%d%d",&n,&c);

    for(int i=0;i<n;i++)scanf("%d",&a[i]);

    sort(a,a+n);

    do{

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

		f[n*a[n-1]][0]=1;

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

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

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

					if (i%n&&(k>>(i%n-1)&1)==0){

						f[min(max(j,i+n*a[i%n-1]),n*c)][k|(1<<(i%n-1))]+=f[j][k];

					}

				}

			}

		}

        z+=f[n*c][(1<<(n-1))-1];

		t++;

    }while(next_permutation(a,a+n-1));

    printf("%.15f\n",z/t/pow(c,n-1));

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



const int N = 112;

const int C = 1103;



int n, c;

int l[N], q[N];

long long f[C][N];



long long solve();



int main() {

  scanf("%d%d", &n, &c);

  for (int i = 1; i <= n; ++i) scanf("%d", &l[i]);

  sort(l + 1, l + n + 1);

  for (int i = 1; i < n; ++i) q[i] = i;

  long double res = 0;

  do { 

    res += solve();

  } while (next_permutation(q + 1, q + n));

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

    res /= i * c * 1.0;

  printf("%.12Lf\n", res);

  return 0;

}



long long solve() {

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

  f[n * l[n]][0] = 1;

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

    if (!(i % n)) continue;

    int x = q[i % n];

    for (int s = 0; s <= (1 << (n - 1)) - 1; ++s) {

      if (s & (1 << (x - 1))) continue;

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

        f[min(n * c, max(j, i + n * l[x]))]

          [s | (1 << (x - 1))] += f[j][s];

      }

    }

  }

  return f[n * c][(1 << (n - 1)) - 1];

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

#define N 10



using namespace std;

typedef long long ll;



template <class T> inline void read(T &x) {

	char ch; bool flag = false;

	while (!isdigit(ch = getchar())) flag |= ch == '-';

	for (x = ch ^ 48; isdigit(ch = getchar()); x = x * 10 + (ch ^ 48));

	if (flag) x = -x;

}



inline int input() {

	int x; char ch; bool flag = false;

	while (!isdigit(ch = getchar())) flag |= ch == '-';

	for (x = ch ^ 48; isdigit(ch = getchar()); x = x * 10 + (ch ^ 48));

	return flag ? -x : x;

}



const int mod = 1e9 + 7;

inline int add(int x, int y) { x += y; return x >= mod ? x - mod : x; }

inline void inc(int &x, int y) { x += y; x -= x >= mod ? mod : 0; }



inline int Power(int x, int y) {

	int res = 1;

	while (y) {

		if (y & 1) res = (ll) res * x % mod;

		x = (ll) x * x % mod, y >>= 1;

	} return res;

}



template <class T> void chkmax(T &x, T y) { x = x > y ? x : y; }

template <class T> void chkmin(T &x, T y) { x = x < y ? x : y; }

template <class T> T gcd(T x, T y) { return !y ? x : gcd(x % y, y); }



int n, c;

int len[N];

ll f[50][500];

int p[N];



ll calc() {

	memset(f, 0, sizeof f);

	f[0][len[n] * n] = 1;

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

		if (!(i % n)) continue;

		int x = p[i % n];

		for (int S = 0; S < (1 << (n - 1)); ++S) {

			if (S & (1 << x - 1)) continue;

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

				f[S | (1 << x - 1)][min(n * c, max(j, i + n * len[x]))] += f[S][j];

		}

	}

	return f[(1 << (n - 1)) - 1][n * c];

}



int main() {

	cin >> n >> c;

	for (int i = 1; i <= n; ++i) cin >> len[i];

	sort(len + 1, len + n + 1);

	for (int i = 1; i < n; ++i) p[i] = i;

	long double ans = 0;

	do { ans += calc(); } while (next_permutation(p + 1, p + n));

	for (int i = 1; i < n; ++i) ans /= 1.0L * i * c;

	printf("%.12Lf\n", ans);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<cstring>

#include<algorithm>

#define inlien inline

#define retrun return

#define cpnst const

typedef long double ld;

int a[111],n,c;

ld dp[555][555];

inline int min(int x,int y)

{return(x<y)?x:y;}

inline int max(int x,int y)

{return(x>y)?x:y;}

int main()

{

	scanf("%d%d",&n,&c);

	register int i,ii,S;

	for(i=1;i<=n;i++)scanf("%d",&a[i]);

	ld fac=0,pwd=1;

	for(i=1;i<n;i++)pwd*=c;

	std::sort(a+1,a+n+1);

	ld ans=0;

	do

	{

		memset(dp,0,sizeof(dp)),

		fac++,dp[a[n]*n][0]=1;

		for(i=1;i<=n*c;i++)

		{

			int v=i%n;

			if(!v)continue;

			for(ii=i;ii<=n*c;ii++)

				for(S=0;S<(1<<(n-1));S++)

				{

					if(S&(1<<(v-1)))continue;

					int to=min(n*c,max(ii,i+n*a[v]));

					dp[to][S|(1<<(v-1))]+=dp[ii][S];

				}

		}ans+=dp[n*c][(1<<(n-1))-1]/pwd;

	}while(std::next_permutation(a+1,a+n));

	printf("%.15Lf\n",ans/fac);

}

/*

Giving the world a better yourself is giving yourself a better world. 

*/

// Optimized solution to the same problem (faster):
#include <cmath>

#include <cstdio>

#include <cstring>

#include <iostream>

#include <algorithm>



using namespace std;



int n , c;



const int N = 505;



int l[N];



double f[N][2 << 7] , ans , t;



int main(){

	cin >> n >> c;

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

		cin >> l[i];

	sort(l , l + n);

	do{

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

        f[l[n - 1] * n][0] = 1;

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

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

                for(int S = 0; S < (1 << n - 1); S++)

                    if(i % n && !((S >> (i % n - 1)) & 1))

                        f[min(n * c, max(j, i + l[i % n - 1] * n))][S | (1 << (i % n - 1))] += f[j][S];

        ans += f[n * c][(1 << n - 1) - 1];

        ++t;

	}while(next_permutation(l , l + n - 1));

	printf("%.15lf" , (double)ans / t / pow(c , n - 1));

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

#define forn(i, n) for (int (i) = 0; (i) != (n); (i)++)

ll n, c, g, a, we, le, ac, L[7], p[7], k, dp[500][500];

signed main()

{

    cin >> n >> c, c *= n, k = (1 << (n - 1));

    forn(i, n) cin >> L[i], L[i] *= n;

    sort(L, L + n);

    iota(p, p + n - 1, 0);

    do {

        memset(dp, 0, sizeof(dp));

        dp[L[n - 1]][0] = 1;

        forn(i, c) if (i % n)

        {

            we = p[i % n - 1];

            forn(mask, k) if (!((1 << we) & mask))

                for (ac = i; ac <= c; ac++)

                    dp[max(ac, min(c, L[we] + i))][mask + (1 << we)] += dp[ac][mask];

        }

        g += dp[c][k - 1], a++;

    } while (next_permutation(p, p + n - 1));

    printf("%.15f", g / pow(c / n, n - 1) / a);

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

#define forn(i,n) for(int i=0;i!=n;i++)

ll n,c,g,a,ac,L[7],m,k,dp[500][500];

int main(){

cin>>n>>c,c*=n,m=n-1,k=1<<m;

forn(i,n)cin>>L[i],L[i]*=n;

sort(L,L+n);

do{

    memset(dp,0,sizeof(dp)),dp[L[m]][0]=1;

    forn(i,c)if(i%n){

        forn(mask,k)if(!((1<<(i%n-1))&mask))

            for(ac=i;ac<=c;ac++)dp[max(ac,min(c,L[i%n-1]+i))][mask+(1<<(i%n-1))]+=dp[ac][mask];

    }g+=dp[c][k-1],a++;

}while(next_permutation(L,L+m));

printf("%.15f",g/pow(c/n,m)/a);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

#define forn(i,n) for(int i=0;i!=n;i++)

ll n,c,g,a,we,ac,L[7],p[7],m,k,dp[500][500];

int main(){

cin>>n>>c,c*=n,m=n-1,k=1<<m;

forn(i,n)cin>>L[i],L[i]*=n;

sort(L,L+n);

iota(p,p+m,0);

do{

    memset(dp,0,sizeof(dp)),dp[L[m]][0]=1;

    forn(i,c)if(i%n){

        we = p[i%n-1];

        forn(mask,k)if(!((1<<we)&mask))

            for(ac=i;ac<=c;ac++)dp[max(ac,min(c,L[we]+i))][mask+(1<<we)]+=dp[ac][mask];

    }g+=dp[c][k-1],a++;

}while(next_permutation(p,p+m));

printf("%.15f",g/pow(c/n,m)/a);

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

#define forn(i,n) for(int i=0;i!=n;i++)

ll n,c,g,a,ac,L[7],m,k,dp[500][500];

int main(){

cin>>n>>c,c*=n,m=n-1,k=1<<m;

forn(i,n)cin>>L[i],L[i]*=n;

sort(L,L+n);

do{

    memset(dp,0,sizeof(dp)),dp[L[m]][0]=1;

    forn(i,c)if(i%n){

        forn(mask,k)if(!((1<<(i%n-1))&mask))

            for(ac=i;ac<=c;ac++)dp[max(ac,min(c,L[i%n-1]+i))][mask+(1<<(i%n-1))]+=dp[ac][mask];

    }g+=dp[c][k-1],a++;

}while(next_permutation(L,L+m));

printf("%.15f",g/pow(c/n,m)/a);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <cmath>

#include <set>

#include <queue>

#include <iomanip>

#include <vector>

#include <numeric>

//#include <bits/stdc++.h>



using namespace std;

const int INF = 1 << 30 ;

queue<int> Q;





bool BFS()

{

    while(!Q.empty())

    {

        int x;

        x = Q.front();

        Q.pop();

        if(x==0)

        {

            return true;

        } 

        else 

        {

            if(x-4>=0)

                Q.push(x-4);

            if(x-7>=0)

                Q.push(x-7);

        }

    }

    return false;

}



int main()

{

    ios::sync_with_stdio(false);

    int n;

    cin>>n;

    Q.push(n);

    if(BFS())

        cout<<"Yes"<<endl;

    else 

        cout<<"No"<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

int main()

{

    int N,i,j;

	int sum=0;

	scanf("%d",&N);

    for(i=0;i<=25;i++)

	{

		for(j=0;j<=14;j++)

		{

            if(i*4+j*7==N)

			{

				sum=1;

			}

		}

	}

	if(sum==1)

	{

		printf("Yes\n");

	}

	if(sum==0)

	{

		printf("No\n");

	}

	return 0;

}

// Fastest known solution for this problem: