func_code_string: #include <bits/stdc++.h>   using namespace std;   double dp[110][110][110] = {0};   double c[110][110] = {0};   int a[110], n, m;   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= m; ++i) scanf( %d , &a[i]);     for (int i = 0; i <= n + m; ++i) c[i][0] = 1;     for (int i = 1; i <= n + m; ++i)       for (int j = 1; j <= i; ++j) c[i][j] = c[i - 1][j - 1] + c[i - 1][j];     for (int i = 0; i <= m; ++i) dp[i][0][0] = 1;     for (int i = 1; i <= m; ++i)       for (int j = 1; j <= n; ++j)         for (int k = 0; k <= j; ++k) {           int l = max(a[i] * (k - 1) + 1, 0), r = a[i] * k;           for (int w = 0; w <= k; ++w)             for (int p = l; p <= min(r, j); ++p)               dp[i][j][k] += dp[i - 1][j - p][w] * c[n - j + p][p];           for (int p = 0; p <= min(l - 1, j); ++p)             dp[i][j][k] += dp[i - 1][j - p][k] * c[n - j + p][p];         }     double ans = 0;     for (int i = 1; i <= n; ++i) ans += dp[m][n][i] * i;     for (int i = 1; i <= n; ++i) ans /= (double)m;     printf( %.10lf , ans);     return 0;   }   