func_code_string: #include <bits/stdc++.h>   using namespace std;   int N, cnt[100010], beg_cnt[100010];   double ans = 0, dp[100010][110], buf[110];   int main() {     scanf( %d , &N);     for (int i = 0; i < N; ++i) {       scanf( %d , &cnt[i]), dp[i][cnt[i]] = 1;       beg_cnt[i] = cnt[i];       if (cnt[i] == 0) ++ans;     }     int M;     scanf( %d , &M);     for (int i = 0; i < M; ++i) {       int f, t, how;       scanf( %d%d%d , &f, &t, &how);       --f;       --t;       ans -= dp[f][0];       for (int S = 0; S < how; ++S) {         memset(buf, 0, (beg_cnt[f] + 1) * sizeof(double));         for (int i = 0; i <= beg_cnt[f]; ++i) {           buf[i] += dp[f][i] * ((cnt[f] - i + 0.0) / cnt[f]);           if (i) buf[i - 1] += dp[f][i] * ((i + 0.0) / cnt[f]);         }         memcpy(dp[f], buf, (beg_cnt[f] + 1) * sizeof(double));         --cnt[f];       }       cnt[t] += how;       ans += dp[f][0];       printf( %.18lf n , ans);     }     return 0;   }   