#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
  point() {
    x = 0;
    y = 0;
  }
  point(double a, double b) : x(a), y(b) {}
  bool operator<(const point &rhs) const { return x < rhs.x; }
};
bool equal(point a, point b) {
  return abs(a.x - b.x) < 1e-9 && abs(a.y - b.y) < 1e-9;
}
struct Line {
  point p1, p2;
  double A, B, C;
  Line() {}
  Line(double xx1, double yy1, double xx2, double yy2) {
    p1 = point(xx1, yy1), p2 = point(xx2, yy2);
    A = p1.y - p2.y, B = p2.x - p1.x, C = -(A * p1.x + B * p1.y);
  }
  Line(point t1, point t2) {
    p1 = t1, p2 = t2;
    A = p1.y - p2.y, B = p2.x - p1.x, C = -(A * p1.x + B * p1.y);
  }
  double getY(double x) { return (-C - A * x) / B; }
};
bool is_in_line_seg(double x, double y, Line LL) {
  if (!(min(LL.p1.x, LL.p2.x) - 1e-9 <= x &&
        x <= max(LL.p1.x, LL.p2.x) + 1e-9 &&
        min(LL.p1.y, LL.p2.y) - 1e-9 <= y && y <= max(LL.p1.y, LL.p2.y) + 1e-9))
    return false;
  return abs(LL.A * x + LL.B * y + LL.C) < 1e-9;
}
bool intersection_line_line(Line L1, Line L2, point &p) {
  double det = L1.A * L2.B - L2.A * L1.B;
  if (abs(det) < 1e-9) return 0;
  p.x = -(L2.B * L1.C - L1.B * L2.C) / det;
  p.y = -(L1.A * L2.C - L2.A * L1.C) / det;
  return 1;
}
double calc(vector<point> &v) {
  double ret = 0;
  int n = v.size();
  for (int i = 0; i < n; ++i) {
    ret += v[i].x * v[(i + 1) % n].y - v[(i + 1) % n].x * v[i].y;
  }
  return abs(ret) / 2.0;
}
int n, k;
Line L[333][333];
vector<point> v[333];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    double p1, p2;
    cin >> p1;
    for (int j = 0; j < k; ++j) {
      cin >> p2;
      L[i][j] = Line(j, p1, j + 1, p2);
      p1 = p2;
    }
  }
  for (int j = 0; j < k; ++j)
    v[j].push_back(point(j, 2000)), v[j].push_back(point(j, 0)),
        v[j].push_back(point(j + 1, 0)), v[j].push_back(point(j + 1, 2000));
  for (int i = 0; i < n; ++i) {
    double ans = 0;
    printf("");
    for (int j = 0; j < k; ++j) {
      vector<point> nv;
      vector<point> tmp;
      Line cur = L[i][j];
      bool in = 0;
      for (int t = 0; t < (int)v[j].size() - 1; ++t) {
        point p1 = v[j][t];
        point p2 = v[j][t + 1];
        Line len = Line(p1, p2);
        point inter;
        if (!intersection_line_line(cur, len, inter) ||
            !is_in_line_seg(inter.x, inter.y, len) || equal(p1, inter)) {
          if (in) tmp.push_back(p2);
          continue;
        }
        nv.push_back(inter);
        if (!in) {
          tmp.clear(), in = 1;
          tmp.push_back(inter);
          tmp.push_back(p2);
        } else {
          tmp.push_back(inter);
          ans += calc(tmp);
          tmp.clear();
          in = 0;
        }
      }
      for (int t = 1; t < (int)v[j].size() - 1; ++t) {
        double yy = cur.getY(v[j][t].x);
        if (yy > v[j][t].y + 1e-9) continue;
        nv.push_back(v[j][t]);
      }
      sort(nv.begin(), nv.end());
      v[j].clear();
      v[j].push_back(point(j, 2000));
      for (int t = 0; t < nv.size(); ++t) {
        if (!equal(v[j].back(), nv[t])) v[j].push_back(nv[t]);
      }
      v[j].push_back(point(j + 1, 2000));
    }
    printf("%.10lf\n", ans);
  }
}
