func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e6 + 5;   double a[maxn], st[maxn];   int len[maxn];   int main() {     int n, x;     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       scanf( %d , &x);       a[i] = x;     }     int p = 0;     for (int i = 1; i <= n; i++) {       st[++p] = a[i];       len[p] = 1;       while (p > 1 && st[p] < st[p - 1]) {         st[p - 1] =             (st[p - 1] * len[p - 1] + st[p] * len[p]) / (len[p - 1] + len[p]);         len[p - 1] += len[p];         p--;       }     }     for (int i = 1; i <= p; i++) {       for (int j = 1; j <= len[i]; j++) {         printf( %.10f n , st[i]);       }     }     return 0;   }   