func_code_string: #include <bits/stdc++.h>   using namespace std;   const double eps = 1e-9;   int main() {     cout << fixed << setprecision(12);     int n, k;     cin >> n >> k;     vector<vector<int>> y(n, vector<int>(k + 1));     for (auto &yi : y)       for (auto &yij : yi) cin >> yij;     vector<double> sum(n);     for (int j = 0; j < k; j++) {       vector<tuple<int, int, int>> v;       for (int i = 0; i < n; i++) {         v.emplace_back(y[i][j + 1] - y[i][j], y[i][j], i);       }       sort(begin(v), end(v));       auto calc = [&](int k) {         vector<double> x(n + 1), y(n + 1);         x[0] = 0.0, y[0] = 0.0;         x[1] = 1.0, y[1] = 0.0;         int sz = 2;         for (auto &t : v)           if (get<2>(t) < k) {             auto a = get<0>(t), b = get<1>(t);             auto f = [&](double x) { return a * x + b; };             int p = sz - 1;             while (p >= 0 && f(x[p]) + eps >= y[p]) p--;             if (p == -1) {               y[0] = f(x[0] = 0.0);               y[1] = f(x[1] = 1.0);               sz = 2;             } else if (p != sz - 1) {               double a2 = (y[p + 1] - y[p]) / (x[p + 1] - x[p]);               double b2 = y[p] - x[p] * a2;               double x2 = (b2 - b) / (a - a2);               y[p + 1] = f(x[p + 1] = x2);               y[p + 2] = f(x[p + 2] = 1.0);               sz = p + 3;             }           }         double sum = 0.0;         for (int i = 0; i + 1 < sz; i++) {           sum += (x[i + 1] - x[i]) * (y[i + 1] + y[i]) / 2;         }         return sum;       };       vector<double> acc(n + 1);       for (int i = 0; i < n; i++) acc[i + 1] = calc(i + 1);       for (int i = 0; i < n; i++) sum[i] += acc[i + 1] - acc[i];     }     for (int i = 0; i < n; i++) cout << sum[i] << endl;     return 0;   }   