func_code_string: #include <bits/stdc++.h>   using namespace std;   const long double EPS = 1e-9, pi = acos(-1);   const long long N = 1e5 + 5;   long long r[N], h[N], n, F[N], dp[N];   bool cmp(pair<long long, long long> a, pair<long long, long long> b) {     if (a.first == b.first) {       return a.second < b.second;     } else       return a.first < b.first;   }   void add(long long d, long long id) {     while (id <= n) {       F[id] = max(F[id], d);       id += (id & -id);     }   }   long long get(long long i) {     long long res = 0;     while (i) {       res = max(res, F[i]);       i -= (i & -i);     }     return res;   }   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> n;     for (long long i = 1; i <= n; ++i) cin >> r[i] >> h[i];     vector<pair<long long, long long> > A;     A.clear();     for (long long i = 1; i <= n; ++i) {       A.push_back({r[i] * r[i] * h[i], i});     }     sort(A.begin(), A.end(), cmp);     long long res = 0, id = 0, prev = A[0].first;     for (long long i = 0; i < n; ++i) {       if (prev != A[i].first) {         while (id < i) {           add(dp[id], A[id].second);           id++;         }       }       dp[i] = get(A[i].second) + A[i].first;       res = max(res, dp[i]);       prev = A[i].first;     }     cout << fixed << setprecision(9) << pi * res << endl;     return 0;   }   