func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> d;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     int n, u;     cin >> n >> u;     d.resize(n);     for (int i = 0; i < n; i++) {       cin >> d[i];     }     double ans = -1.0;     for (int k = 2; k < n; k++) {       int i = lower_bound(d.begin(), d.end(), d[k] - u) - d.begin();       int j = i + 1;       if (i == j || j == k || k == i) continue;       double res = double(d[k] - d[j]) / double(d[k] - d[i]);       ans = max(ans, res);     }     for (int i = 0; i < n - 2; i++) {       int j = i + 1;       int k = upper_bound(d.begin(), d.end(), u + d[i]) - d.begin();       k--;       if (i == j || j == k || k == i) continue;       double res = double(d[k] - d[j]) / double(d[k] - d[i]);       ans = max(ans, res);     }     cout.precision(15);     cout.fixed;     cout << ans;     return 0;   }   