func_code_string: #include <bits/stdc++.h>   using namespace std;   char buf[1 << 21], *p1 = buf, *p2 = buf;   template <class T>   void read(T &x) {     x = 0;     int c = getchar();     int flag = 0;     while (c <  0  || c >  9 ) flag |= (c ==  - ), c = getchar();     while (c >=  0  && c <=  9 )       x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();     if (flag) x = -x;   }   template <class T>   T _max(T a, T b) {     return b < a ? a : b;   }   template <class T>   T _min(T a, T b) {     return a < b ? a : b;   }   template <class T>   bool checkmax(T &a, T b) {     return a < b ? a = b, 1 : 0;   }   template <class T>   bool checkmin(T &a, T b) {     return b < a ? a = b, 1 : 0;   }   const int N = 82;   int n;   int l[N], r[N], foo[N];   int arr[N << 1], top = 0;   int L, R;   double f[N][N], g[N][N];   double ans[N][N];   void init() {     read(n);     for (int i = 1; i <= n; ++i) {       read(l[i]);       read(r[i]);       arr[++top] = l[i];       arr[++top] = r[i];       foo[i] = r[i] - l[i];     }     sort(arr + 1, arr + top + 1);     top = unique(arr + 1, arr + top + 1) - arr - 1;   }   double calcl(int idx) {     return 1.0 * _min(_max(0, L - l[idx]), foo[idx]) / foo[idx];   }   double calcr(int idx) {     return 1.0 * _min(_max(0, r[idx] - R), foo[idx]) / foo[idx];   }   double calcmid(int idx) { return 1 - calcl(idx) - calcr(idx); }   void run(int idx, int bar) {     L = arr[bar], R = arr[bar + 1];     if (L < l[idx] || R > r[idx]) return;     memset(f, 0, sizeof f);     f[0][0] = 1;     int tot = 0;     for (int i = 1; i <= n; ++i) {       if (i == idx) continue;       ++tot;       double cl = calcl(i), cr = calcr(i), cm = calcmid(i);       for (int j = tot; j >= 0; --j) {         for (int k = tot - j; k >= 0; --k) {           if (j + k < tot)             f[j][k] *= cm;           else             f[j][k] = 0;           if (j) f[j][k] += f[j - 1][k] * cl;           if (k) f[j][k] += f[j][k - 1] * cr;         }       }     }     double co = 1.0 * (R - L) / foo[idx];     for (int i = 0; i <= tot; ++i) {       for (int j = 0; i + j <= tot; ++j) {         int num = tot - i - j + 1;         double res = f[i][j] / num * co;         ans[idx][i + 1] += res;         ans[idx][n - j + 1] -= res;       }     }   }   void solve() {     for (int i = 1; i <= n; ++i) {       for (int j = 1; j < top; ++j) {         run(i, j);       }     }     for (int i = 1; i <= n; ++i) {       for (int j = 1; j <= n; ++j) {         ans[i][j] += ans[i][j - 1];         printf( %.8lf%c , ans[i][j],    n [j == n]);       }     }   }   int main() {     init();     solve();     return 0;   }   