func_code_string: #include <bits/stdc++.h>   using namespace std;   static const double EPS = 1e-13;   int ROUND(double x) { return (int)(x + 0.5); }   bool ISINT(double x) { return fabs(ROUND(x) - x) <= EPS; }   bool ISEQUAL(double x, double y) {     return fabs(x - y) <= EPS * max(1.0, max(fabs(x), fabs(y)));   }   double SQSUM(double x, double y) { return x * x + y * y; }   template <class T>   bool INRANGE(T x, T a, T b) {     return a <= x && x <= b;   }   int main() {     long long n, l, t;     scanf( %lld %lld %lld n , &n, &l, &t);     vector<long long> a(n);     for (int i = 0; i < n; i++) {       scanf( %lld  n , &a[i]);     }     long long count = 0;     long long base = 2 * t / l;     long long boundary = (2 * t) % l;     {       int x = 1;       for (int y = 0; y < n - 1; y++) {         x = max(x, y + 1);         while (x < n) {           if (a[x] - a[y] > boundary) {             break;           }           x++;         }         count += (x - (y + 1));       }     }     {       int x = 1;       for (int y = 0; y < n - 1; y++) {         x = max(x, y + 1);         while (x < n) {           if (l - (a[x] - a[y]) <= boundary) {             break;           }           x++;         }         count += (n - x);       }     }     double ans = 0.0;     double masu = n * (n - 1) * 0.5;     ans += (double)base * masu * 2;     ans += 1.0 * count;     ans /= 4;     printf( %.16f n , ans);     return 0;   }   