func_code_string: #include <bits/stdc++.h>   using namespace std;   #pragma comment(linker,  /STACK:100000000 )   int n;   double l;   pair<int, int> mas[1010];   int lst[1010];   double dp[1010];   bool check(double r) {     for (int i = 0; i <= n; i++) lst[i] = -1;     for (int i = 1; i <= n; i++) dp[i] = -1e15;     for (int i = 0; i < n; i++) {       if (lst[i] == -1 && i != 0) continue;       for (int j = i + 1; j <= n; j++) {         double p = sqrt(abs(l - (double)(mas[j].first - mas[i].first)));         if (dp[j] < dp[i] + (double)mas[j].second * r - p) {           lst[j] = i;           dp[j] = dp[i] + (double)mas[j].second * r - p;         }       }     }     if (lst[n] != -1 && dp[n] > -1e-9)       return true;     else       return false;   }   int main() {     scanf( %d %lf , &n, &l);     for (int i = 1; i <= n; i++) scanf( %d %d , &mas[i].first, &mas[i].second);     double l = 0, r = 1e9;     for (int i = 0; i < 100; i++) {       double av = (l + r) / 2.0;       if (check(av))         r = av;       else         l = av;     }     check(l);     vector<int> ans;     int cur = n;     while (cur != 0) {       ans.push_back(cur);       cur = lst[cur];     }     for (int i = (int)(ans).size() - 1; i >= 0; i--) printf( %d  , ans[i]);     return 0;   }   