func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( O2 )   #pragma GCC optimize( unroll-loops )   using namespace std;   const int MAX = 47 + 5;   const long long MAX2 = 11;   const long long MOD = 1000000007;   const long long MOD2 = 1000005329;   const long long INF = 2e18;   const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};   const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};   const double pi = acos(-1);   const double EPS = 1e-9;   const int block = 555;   int n, x[MAX], sm, k, tmp;   long long dp[MAX][MAX][MAX], fr[MAX];   double ans, res;   long long f(int nw, int rem, int cnt) {     if (rem == 0) return cnt == 0;     if (cnt < 0 || nw > n) return 0;     long long &ret = dp[nw][rem][cnt];     if (ret != -1) return ret;     ret = f(nw + 1, rem, cnt);     if (x[nw] <= rem) ret += f(nw + 1, rem - x[nw], cnt - 1);     return ret;   }   int main() {     cout << fixed << setprecision(10);     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> n;     for (int i = 1; i <= n; ++i) cin >> x[i], sm += x[i];     cin >> k;     if (k >= sm) return cout << n <<   n , 0;     for (int i = 1; i <= n; ++i) {       tmp = x[i];       x[i] = 100;       memset(dp, -1, sizeof dp);       for (int j = max(1, k - tmp + 1); j <= k; ++j)         for (int o = 1; o <= n; ++o) fr[o] += f(1, j, o);       x[i] = tmp;     }     for (int i = 1; i <= n; ++i) {       res = fr[i] * i;       for (int j = i + 1; j < n; ++j) res /= j, res *= n - j;       res /= n;       ans += res;     }     cout << ans <<   n ;     return 0;   }   