#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double EPS = 1e-6;
double seg[1000005];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  const int DIV = 1000005 / k;
  for (int i = 0; i < n; i++) {
    int x1;
    scanf("%d", &x1);
    double sum = 0.0;
    for (int j = 0; j < k; j++) {
      int x2;
      scanf("%d", &x2);
      double delta = (1.0 * x2 - x1) / DIV;
      for (int t = 0; t <= DIV; t++) {
        double esilon = 1.0 * x1 + delta * t;
        if (seg[j * DIV + t] < esilon) {
          sum += esilon - seg[j * DIV + t];
          seg[j * DIV + t] = esilon;
        }
      }
      x1 = x2;
    }
    printf("%.4lf\n", sum / DIV);
  }
  return 0;
}
