func_code_string: #include <bits/stdc++.h>   using namespace std;   int gi() {     char ch =  ! ;     int res = 0, f = 0;     while (ch <  0  || ch >  9 ) {       ch = getchar();       if (ch ==  - ) f = 1;     }     while (ch >=  0  && ch <=  9 ) res = res * 10 + ch -  0 , ch = getchar();     return f ? -res : res;   }   const int N = 1e5 + 7;   int n, Q, arr[N], cur[N];   double f[N][110], ans;   int main() {     n = gi();     for (int i = 1; i <= n; ++i) {       arr[i] = gi(), f[i][arr[i]] = 1, cur[i] = arr[i];       ans += f[i][0];     }     Q = gi();     for (int i = 1; i <= Q; ++i) {       int u = gi(), v = gi(), x = gi();       ans -= f[u][0];       for (int k = 1; k <= x; ++k) {         for (int j = 0; j <= arr[u]; ++j) {           if (j > cur[u])             f[u][j] = 0;           else {             f[u][j] = (cur[u] - j) / (double)cur[u] * f[u][j];             if (j + 1 <= cur[u])               f[u][j] += (j + 1) / (double)cur[u] * f[u][j + 1];           }         }         --cur[u];       }       cur[v] += x;       ans += f[u][0];       printf( %.10lf n , ans);     }     return 0;   }   