Problem:
Problem H. Enlarge Circles
You are given $N$ distinct points on the 2-D plane. For each point, you are going to make a single circle whose center is located at the point. Your task is to maximize the sum of perimeters of these $N$ circles so that circles do not overlap each other. Here, "overlap" means that two circles have a common point which is not on the circumference of at least either of them. Therefore, the circumferences can be touched. Note that you are allowed to make a circle with radius $0$.
Input
The input consists of a single test case in the following format.
$N$
$x_1$ $y_1$
$\vdots$
$x_N$ $y_N$
The first line contains an integer $N$, which is the number of points ($2 \leq N \leq 200$). Each of the following $N$ lines gives the coordinates of a point. Integers $x_i$ and $y_i$ ($-100 \leq x_i, y_i \leq 100$) in the $i$-th line of them give the $x$- and $y$-coordinates, respectively, of the $i$-th point. These points are distinct, in other words, $(x_i,y_i) \ne (x_j, y_j)$ is satisfied if $i$ and $j$ are different.
Output
Output the maximized sum of perimeters. The output can contain an absolute or a relative error no more than $10^{-6}$.
Examples
Sample Input 1
3
0 0
3 0
5 0
Output for Sample Input 1
31.415926535
Sample Input 2
3
0 0
5 0
0 5
Output for Sample Input 2
53.630341225
Sample Input 3
9
91 -18
13 93
73 -34
15 2
-46 0
69 -42
-23 -13
-87 41
38 68
Output for Sample Input 3
1049.191683488

Submitted solutions:

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1ll << 60;
#define REP(i, n) for(ll i=0; i <ll(n); i++)
template <class T> using V = vector<T>;
template <class A, class B>
bool chmax(A &a, B b) { return a < b && (a=b, true); }
template <class A, class B>
bool chmin(A &a, B b) { return b < a && (a=b, true); }

V<int> AssignmentProblem(
  int n, int m, const V<V<double>>& A
){
  V<double> d(m+1,0), h(m,0);
  V<int> l(n,-1), r(m,-1);
  REP(q,n){
    V<int> f(m), par(m,-1);
    auto ch = [&](int w, double f, int v){ if(f < d[w]) d[w] = f, par[w] = v; };
    REP(v,m+1) d[v] = 1.0e100;
    REP(v,n) if(l[v] < 0) REP(w,m) ch(w, A[v][w] - h[w], v);
    int w = -1;
    while(1){
      w = m;
      REP(i,m) if(!f[i] && d[i] < d[w]) w = i;
      f[w] = 1;
      if(r[w] < 0) break;
      int v = r[w];
      auto c = d[w] + h[w] - A[v][w];
      REP(x,m) if(!f[x]) ch(x, c + A[v][x] - h[x], v);
    }
    REP(i,m) if(f[i]) h[i] += d[i] - d[w];
    while(w >= 0) swap(w, l[r[w] = par[w]]);
  }
  return l;
}


void testcase(){
  cout.precision(20);
  ll N; cin >> N;
  V<V<double>> A(N, V<double>(N));
  V<double> X(N), Y(N);
  REP(i,N) cin >> X[i] >> Y[i];
  REP(i,N) A[i][i] = 1.0e100;
  REP(i,N) REP(j,N) if(i != j){
    double dx = X[i] - X[j];
    double dy = Y[i] - Y[j];
    A[i][j] = A[j][i] = hypot(dx,dy);
  }
  auto P = AssignmentProblem(N, N, A);
  double ans = 0.0;
  REP(i,N) ans += A[i][P[i]];
  ans *= acos(-1);
  cout << ans << '\n';
}

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  testcase();
  return 0;
}
accuracy: 1
time_ms: 10
memory_kb: 3840
final_rank: 1

code_snippet: /**
 * Simplex Method - Linear Programming Solver
 * 
 * Works faster than classic implementation.
 * But, I have no idea if this code is correct
 * 
 * Using Standard Form:
 *  max {cx : Ax <= b, x >= 0}
 * 
 * Given a LP with n variables and m constraints
 * 
 * Complexity:
 *  - Time: Exponential, but in practice frequently works in O(nm^2)
 *  - Space : O(nm)
 * 
 * Note: reducing the point floating precision can reduce
 * the overall running time by a factor of ~2,5.
 * 
 */

#include <bits/stdc++.h>
using namespace std;

#define FOR(i, b) for(int i = 0; i < (b); i++)
#define FORI(i, b) for(int i = 1; i <= (b); i++)
#define all(a) a.begin(), a.end()
#define SZ(a) ((int)a.size())
using ld = long double;
using vd = vector<ld>;
using vvd = vector<vd>;
using vi = vector<int>;
using ii = pair<int, int>;
 
const ld EPS = 1e-9;
#define diffZero(x) ((x > EPS) || (x < -EPS))

inline bool lessPair(ld d1, int i1, ld d2, int i2){
  return abs(d1 - d2) > EPS ? d1 < d2 : i1 < i2;
}

struct LPSolver {
  int m, n;
  vi B, N;
  vvd D;
 
  LPSolver(const vvd &A, const vd &b, const vd &c) :
   m(SZ(b)), n(SZ(c)), B(m + 1), N(n + 1), D(m + 1, vd(n + 1, 0)) {
    FOR(i, m){
      FOR(j, n)
        D[i + 1][j] = A[i][j];
      D[i + 1][n] = b[i];
    }
    FOR(i, n)
      D[0][i] = -c[i];
    FOR(i, m + 1)
      B[i] = -i;
    FOR(j, n + 1)
      N[j] = j;
  }
 
  void Pivot(int r, int s) {
    FOR(i, m + 1) 
      if (i != r && diffZero(D[i][s]))
        FOR(j, n + 1) 
          if (j != s)
            D[i][j] -= D[r][j] * D[i][s] / D[r][s];
    FOR(j, n + 1)
      if (j != s) 
        D[r][j] /= D[r][s];
    FOR(i, m + 1)
      if (i != r) 
        D[i][s] /= -D[r][s];
    D[r][s] = 1.0 / D[r][s];
    swap(B[r], N[s]);
  }

  ld Solve(vector<ld>& x){
    while(true){
      int ii = 1, jj = 0;
      FORI(i, m)
        if (lessPair(D[i][n], B[i], D[ii][n], B[ii])) 
          ii = i;
      if (D[ii][n] > -EPS)
        break;
      FOR(j, n)
        if (D[ii][j] < D[ii][jj])
          jj = j;
      if (D[ii][jj] > -EPS)
        return -numeric_limits<ld>::infinity(); //Infeasible
      Pivot(ii, jj);
    }

    while(true){
      int ii = 1, jj = 0;
      FOR(j, n)
        if (lessPair(D[0][j], N[j], D[0][jj], N[jj]))
          jj = j;
      if (D[0][jj] > -EPS)
        break;
      FORI(i, m)
        if (D[i][jj] > EPS && (D[ii][jj] < EPS ||
          lessPair(D[i][n] / D[i][jj], B[i], D[ii][n] / D[ii][jj], B[ii])))
            ii = i;
      if (D[ii][jj] < EPS)
        return numeric_limits<ld>::infinity(); //Unbounded
      Pivot(ii, jj);
    }

    x.assign(n, 0);
    FORI(i, m)
      if (B[i] >= 0) 
        x[B[i]] = D[i][n];
    return D[0][n];
  }
};

int main() {
  cin.tie(0)->sync_with_stdio(0);
  int n;
  cin >> n;
  vector<ii> radius(n);
  FOR(i, n)
    cin >> radius[i].first >> radius[i].second;

  vvd A;
  vd B, C(n);
  fill(all(C), 1.0);
  FOR(i, n)
    for(int j = i + 1; j < n; j++){
      vd l(n);
      l[i] = l[j] = 1;
      A.push_back(l);
      B.push_back(hypot(radius[i].first - radius[j].first, radius[i].second - radius[j].second));
    }
  LPSolver lp(A, B, C);
  ld PI = acos(-1);
  vd X;
  cout << setprecision(9) << fixed << 2 * PI * lp.Solve(X) << endl;

  return 0;
}
accuracy: 1
time_ms: 470
memory_kb: 122372
final_rank: 10

code_snippet: #include <iostream>
#include <array>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <algorithm>
#include <cmath>
#include <string>
#include <climits>
#include <cassert>
#include <iomanip>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <functional>
#include <fstream>
#include <random>

#define LEN(x) (long long)(x.size())
#define FOR(i, a, n) for(int i=(a);i<(n); ++i)
#define FOE(i, a) for(auto i : a)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end())
#define BIT_COUNT(bit) (__builtin_popcount(bit))

typedef long long LL;
template<typename T> std::vector<T> make_v(size_t a){return std::vector<T>(a);}
template<typename T,typename... Ts> auto make_v(size_t a, Ts... ts){ return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));}    // C++14
template<typename T,typename V> typename std::enable_if<std::is_class<T>::value==0>::type fill_v(T &t,const V &v){t=v;}
template<typename T,typename V> typename std::enable_if<std::is_class<T>::value!=0>::type fill_v(T &t,const V &v){for(auto &e:t) fill_v(e,v);}
template<class T> inline T ceil(T a, T b) { return (a + b - 1) / b; }
void print() { std::cout << std::endl; }
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) { std::cout << head; if (sizeof...(tail) != 0) {std::cout << " ";} print(std::forward<Tail>(tail)...); }
template <class T> void print(std::vector<T> &v) {for (auto& a : v) { std::cout << a; if (&a != &v.back()) {std::cout << " ";} }std::cout << std::endl;}
template <class T> void print(std::vector<std::vector<T>> &vv) { for (auto& v : vv) { print(v); }}
void debug() { std::cerr << std::endl; }
template <class Head, class... Tail> void debug(Head&& head, Tail&&... tail) { std::cerr << head; if (sizeof...(tail) != 0) {std::cerr << " ";} print(std::forward<Tail>(tail)...); }
template <class T> void debug(std::vector<T> &v) {for (auto& a : v) { std::cerr << a; if (&a != &v.back()) {std::cerr << " ";} }std::cerr << std::endl;}
template <class T> void debug(std::vector<std::vector<T>> &vv) { for (auto& v : vv) { print(v); }}
inline bool inside(long long y, long long x, long long H, long long W) {return 0 <= y and y < H and 0 <= x and x < W; }
template<class T> inline double euclidean_distance(T y1, T x1, T y2, T x2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
template<class T> inline double manhattan_distance(T y1, T x1, T y2, T x2) { return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> T &chmin(T &a, const T &b) { return a = std::min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = std::max(a, b); }
bool is_bit_on(const unsigned long long bit, const unsigned int i) { return (bit >> i) & 1u; }
unsigned long long bit_set(const unsigned long long bit, const unsigned int i, const unsigned int b) {
    assert(b == 0 or b == 1);
    if (b == 0) { return bit & ~(1ull << i); }
    else        {return bit | (1ull << i); }
}

template<class T> inline std::vector<T> unique(std::vector<T> v) {
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    return v;
}

// 初項s交差d長さnの数列の和
long long sum_of_arithmetic_progression(long long s, long long d, long long n) {
    return n * (2 * s + (n - 1) * d) / 2;
}

// xが2の階乗かどうか判定
bool is_power_of_two(long long x) {
    return !(x & (x - 1));
}

long long gcd(long long a, long long b) {
    if (b == 0) { return a; }
    return gcd(b, a % b);
}

long long gcd(std::vector<long long> &v) {
    long long ans = v[0];
    for (int i = 1; i < (int) v.size(); ++i) {
        ans = gcd(ans, v[i]);
    }
    return ans;
}

long long lcm(long long a, long long b) {
    long long g = gcd(a, b);
    return a / g * b;
}

const int INF = 1u << 30u;  // 1,073,741,824
const long long LINF = 1ull << 60u;
const double EPS = 1e-9;
const long double PI = acos(-1.0);
const std::vector<int> dy2 = {0, 1}, dx2 = {1, 0};
const std::vector<int> dy4 = {0, 1, 0, -1}, dx4 = {1, 0, -1, 0};
const std::vector<int> dy8 = {0, -1, 0, 1, 1, -1, -1, 1}, dx8 = {1, 0, -1, 0, 1, 1, -1, -1};


enum SENSE { MINIMIZE = 1, MAXIMIZE = -1};
enum STATUS { OPTIMAL = 1, NOT_SOLVED = 0, INFEASIBLE = -1, UNBOUNDED = -2, UNDEFINED = -3};

// min or max z = c x
// s.t.  A x = b
class SimplexMethod {
public:
    double objective;
    std::vector<std::vector<double>> tableau;

private:
    const int INF = 1u << 30u;
    const double EPS = 1e-9;

    int num_constraints;
    int num_variables;
    int column_b;
    SENSE sense;
    std::vector<int> base;   // base of row r is base[r]

public:
    SimplexMethod(SENSE sense=MINIMIZE): sense(sense) {

    }

    STATUS solve(const std::vector<std::vector<double>> &A, const std::vector<double> &b, const std::vector<double> &c) {
        this->num_constraints = A.size();
        this->num_variables = A[0].size();

        this->make_tableau(A, b, c);

        // set base
        this->base.resize(num_constraints + 2, -1);
        for (int i = 0; i < num_constraints; ++i) {
            base[i] = i + num_variables;
        }

        // phase1
        const auto status = this->phase1();
        if (status != OPTIMAL) {
            return status;
        }

        // remove artificial variables
        swap(this->tableau[num_constraints], this->tableau[num_constraints + 1]);
        for (int r = 0; r < this->tableau.size(); ++r) {
            std::swap(this->tableau[r][num_variables], this->tableau[r].back());
            this->tableau[r].resize(num_variables + 1);
        }

        return this->phase2();
    }

private:
    void make_tableau(const std::vector<std::vector<double>> &A, const std::vector<double> &b, const std::vector<double> &c) {
        this->tableau.resize(num_constraints + 2, std::vector<double>(num_variables + num_constraints + 1));

        // set A
        for (int i = 0; i < num_constraints; ++i) {
            for (int j = 0; j < num_variables; ++j) {
                this->tableau[i][j] = A[i][j];
            }
        }

        // set b
        for (int i = 0; i < num_constraints; ++i) {
            this->tableau[i][num_variables + num_constraints] = b[i];
        }

        // set c
        for (int i = 0; i < c.size(); ++i) {
            this->tableau[num_constraints][i] = sense * c[i];
        }

        for (int i = 0; i < num_constraints; ++i) {
            tableau.back()[i + num_variables] = 1;
        }
        for (int i = 0; i < num_constraints; ++i) {
            tableau[i][i + num_variables] = 1;
        }

        for (int i = 0; i < num_constraints; ++i) {
            for (int j = 0; j < tableau[0].size(); ++j) {
                tableau.back()[j] -= tableau[i][j];
            }
        }
    }

    STATUS phase1() {
        const auto status = simplex();
        if (status != OPTIMAL) {
            return status;
        }

        if (abs(this->tableau.back().back()) > this->EPS) {
            return INFEASIBLE;
        }

        return OPTIMAL;
    }

    STATUS phase2() {
        const auto status = simplex();
        this->objective = sense * -this->tableau.back().back();
        return status;
    }

    STATUS simplex() {
        int r, c;
        while (true) {
            std::tie(r, c) = bland();
            if (c == -1) {
                break;
            }
            if (r == -1 and c != -1) {
                return UNBOUNDED;
            }

            this->pivot(r, c);
        }

        this->objective = this->tableau.back().back() * sense;
        return OPTIMAL;
    }

    std::pair<int, int> bland() {
        int best_c = -1;
        for (int c = 0; c < this->tableau[0].size() - 1; ++c) {
            if (this->tableau.back()[c] < 0) {
                best_c = c;
                break;
            }
        }
        // optimal
        if (best_c == -1) {
            return std::make_pair(-1, -1);
        }

        int best_r = -1;
        for (int r = 0; r < this->tableau.size() - 2; ++r) {
            if (tableau[r][best_c] <= 0) {
                continue;
            }

            if (best_r == -1) {
                best_r = r;
            }
            else if (tableau[r].back() / tableau[r][best_c] < tableau[best_r].back() / tableau[best_r][best_c]) {
                best_r = r;
            }
        }

        return std::make_pair(best_r, best_c);
    }

    void pivot(const int row, const int col) {
        for (int r = 0; r < this->tableau.size(); ++r) {
            for (int c = 0; c < this->tableau[0].size(); ++c) {
                if (r != row and c != col) {
                    this->tableau[r][c] -= this->tableau[row][c] * this->tableau[r][col] / this->tableau[row][col];
                }
            }
        }

        for (int r = 0; r < this->tableau.size(); ++r) {
            if (r != row) {
                this->tableau[r][col] = 0;
            }
        }
        for (int c = 0; c < this->tableau[0].size(); ++c) {
            if (c != col) {
                this->tableau[row][c] /= this->tableau[row][col];
            }
        }

        this->tableau[row][col] = 1.0;
        this->base[row] = col;
    }
};

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int N;
    cin >> N;

    vector<double> X(N);
    vector<double> Y(N);
    for (int i = 0; i < N; ++i) {
        cin >> X[i] >> Y[i];
    }

    vector<vector<double>> dist(N, vector<double>(N));
    for (int i = 0; i < N; ++i) {
        for (int j = i + 1; j < N; ++j) {
            dist[i][j] = dist[j][i] = euclidean_distance(X[i], Y[i], X[j], Y[j]);
        }
    }

    vector<double> nearest(N, 100000000);
    for (int i = 0; i < N; ++i) {
        for (int j = i + 1; j < N; ++j) {
            chmin(nearest[i], dist[i][j]);
            chmin(nearest[j], dist[i][j]);
        }
    }

    vector<vector<double>> A(N * (N - 1) / 2, vector<double>(N));
    vector<double> b(N * (N - 1) / 2);
    vector<double> c(N, 1);

    int no = 0;
    for (int i = 0; i < N; ++i) {
        for (int j = i + 1; j < N; ++j) {
            if (nearest[i] + nearest[j] > dist[i][j] + 1e-9) {
                A[no][i] = 1.0;
                A[no][j] = 1.0;
                b[no] = dist[i][j];
                no++;
            }
        }
    }

    A.resize(no);
    b.resize(no);

    int m = A.size();
    for (int i = 0; i < A.size(); ++i) {
        A[i].resize(N + m);
        A[i][i + N] = 1.0;
    }

    SimplexMethod solver(MAXIMIZE);
    auto status = solver.solve(A, b, c);
    if (status != OPTIMAL) {
        cout << "status:" << status << endl;
        return 0;
    }

    cout << std::fixed << std::setprecision(10) << solver.objective * 2 * PI << endl;

    return 0;
}
accuracy: 1
time_ms: 1650
memory_kb: 33608
final_rank: 9

code_snippet: #include <cstdio>
#include <cstdint>
#include <cmath>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <tuple>
#include <limits>

template <typename Tp>
class linear_program {
  // optimize given linear program (in a standard form) with simplex algorithm

public:
  using size_type = size_t;
  using value_type = Tp;

private:
  using matrix_type = std::vector<std::vector<value_type>>;
  using vector_type = std::vector<value_type>;
  using indices_type = std::vector<size_type>;
  using S_nl = std::numeric_limits<value_type>;
  constexpr static bool const S_fp = std::is_floating_point<value_type>::value;
  constexpr static value_type const S_infeasible = S_nl::quiet_NaN();
  constexpr static value_type const S_unbounded = S_nl::infinity();


  static size_type S_any_positive(vector_type const& c) {
    for (size_type i = 0; i < c.size(); ++i)
      if (c[i] > 0) return i;
    return -1;
  }

  static size_type S_argmin(vector_type const& v, indices_type const& is) {
    size_type res = 0;
    value_type min = v[0];
    for (size_t i = 1; i < v.size(); ++i) {
      if (v[i] < min || (v[i] == min && is[i] < is[res])) {
        res = i;
        min = v[i];
      }
    }
    return res;
  }

  static void S_pivot(indices_type& ni, indices_type& bi,
                      matrix_type& a, vector_type& b, vector_type& c,
                      value_type& v, size_type l, size_type e) {

    size_type m = b.size();
    size_type n = c.size();

    b[l] /= a[l][e];
    a[l][e] = value_type{1} / a[l][e];
    for (size_type j = 0; j < n; ++j) {
      if (j == e) continue;
      a[l][j] *= a[l][e];
    }

    for (size_type i = 0; i < m; ++i) {
      if (i == l) continue;
      b[i] -= a[i][e] * b[l];
      for (size_type j = 0; j < n; ++j) {
        if (j == e) continue;
        a[i][j] -= a[i][e] * a[l][j];
      }
      a[i][e] *= -a[l][e];
    }
    v += c[e] * b[l];

    for (size_type j = 0; j < n; ++j) {
      if (j == e) continue;
      c[j] -= c[e] * a[l][j];
    }
    c[e] *= -a[l][e];
    std::swap(ni[e], bi[l]);
  }

  static value_type S_initialize(indices_type& ni, indices_type& bi,
                                 matrix_type& a, vector_type& b, vector_type& c,
                                 value_type& v) {
    size_type m = b.size();
    size_type n = c.size();
    ni.resize(n);
    bi.resize(m);
    std::iota(ni.begin(), ni.end(), 0);
    std::iota(bi.begin(), bi.end(), n);
    v = value_type{0};
    size_type k = S_argmin(b, bi);
    if (b[k] >= value_type{0}) {
      // the initial basic solution is feasible
      return true;
    }

    for (auto& ai: a) ai.emplace_back(-1);
    ni.push_back(n+m);

    vector_type c0(n+1);
    c0[n] = value_type{-1};
    S_pivot(ni, bi, a, b, c0, v, k, n);
    S_simplex(ni, bi, a, b, c0, v);

    for (size_type i = 0; i < bi.size(); ++i) {
      if (bi[i] == n+m) {
        if (b[bi[i]] != value_type{0}) {
          // XXX -Wfloat-equal
          return false;
        }
        // perform one (degenerate) pivot to make it nonbasic
        S_pivot(ni, bi, a, b, c0, v, i, n);
        break;
      }
    }
    // from the final slack form of L[aux], remove x[0] from the constraints
    // and restore the original objective function L, but replace each basic
    // variable in this objective function by the right-hand side of its
    // associated constraint

    for (size_type j = 0; j <= n; ++j) {
      if (ni[j] != n+m) continue;
      for (auto& ai: a) ai.erase(ai.begin()+j);
      c0.erase(c0.begin()+j);
      ni.erase(ni.begin()+j);
      break;
    }

    {
      vector_type c1(n);
      for (size_type j = 0; j < n; ++j) {
        size_type n0 = ni[j];
        if (n0 >= n) continue;
        c1[j] = c[n0];
      }
      for (size_type i = 0; i < m; ++i) {
        size_type b0 = bi[i];
        if (b0 >= n) continue;
        for (size_type j = 0; j < n; ++j) {
          c1[j] -= c[b0] * a[i][j];
        }
        v += c[b0] * b[i];
      }
      c = std::move(c1);
    }
    return true;
  }

  static bool S_simplex(indices_type& ni, indices_type& bi,
                        matrix_type& a, vector_type& b, vector_type& c,
                        value_type& v) {

    size_type m = b.size();
    while (true) {
      size_type e = S_any_positive(c);
      if (e+1 == 0) return true;

      vector_type delta(m, S_unbounded);
      for (size_type i = 0; i < m; ++i)
        if (a[i][e] > 0) delta[i] = b[i] / a[i][e];

      size_type l = S_argmin(delta, bi);
      if (delta[l] == S_unbounded) return false;
      S_pivot(ni, bi, a, b, c, v, l, e);
    }
  }

public:
  linear_program() = delete;

  template <typename Matrix, typename Vector>
  static value_type maximize(Matrix const& a0,
                             Vector const& b0, Vector const& c0) {

    size_type m = b0.size();
    matrix_type a(m);
    for (size_type i = 0; i < m; ++i)
      a[i] = vector_type(a0[i].begin(), a0[i].end());

    vector_type b(b0.begin(), b0.end());
    vector_type c(c0.begin(), c0.end());
    indices_type ni, bi;
    value_type v{};
    if (!S_initialize(ni, bi, a, b, c, v)) return S_infeasible;
    if (!S_simplex(ni, bi, a, b, c, v)) return S_unbounded;
    return v;
  }
};

template <typename Tp> constexpr Tp const linear_program<Tp>::S_infeasible;
template <typename Tp> constexpr Tp const linear_program<Tp>::S_unbounded;

int main() {
  size_t N;
  scanf("%zu", &N);

  std::vector<double> x(N), y(N);
  for (size_t i = 0; i < N; ++i)
    scanf("%lf %lf", &x[i], &y[i]);
  
  std::vector<std::pair<double, size_t>> d(N, {1e12, -1});
  for (size_t i = 0; i < N; ++i)
    for (size_t j = 0; j < N; ++j) {
      if (i == j) continue;
      double d0 = std::hypot(x[i]-x[j], y[i]-y[j]);
      if (d[i].first > d0) d[i] = {d0, j};
    }

  std::vector<double> c(N, 1.0), b;
  std::vector<std::vector<double>> a;
  for (size_t i = 0; i < N; ++i)
    for (size_t j = 0; j < i; ++j) {
      double d0 = std::hypot(x[i]-x[j], y[i]-y[j]);
      size_t k = a.size();
      if (d[i].first + d[j].first < d0) continue;

      a.emplace_back(N, 0.0);
      a[k][i] = a[k][j] = 1.0;
      b.push_back(d0);
    }
  
  double r = linear_program<double>::maximize(a, b, c);
  double pi = std::acos(-1.0);
  printf("%.12f\n", 2*pi*r);
}
accuracy: 1
time_ms: 110
memory_kb: 5596
final_rank: 2

code_snippet: #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define double float

using namespace std;

typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;

const int MAX_N = 205;
constexpr double PI = acos(-1);

// max c * x s.t. A*x <= b, x >= 0
class Simplex {
private:
    using Arr = vector<double>;
    using Mat = vector<vector<double> >;
    int *index;
    double** a;
    int row, column, L;

    void Set(const Mat& A, const Arr& b, const Arr& c){
        infinity = none = false;
        row = A.size(),column = A[0].size() + 1;
        index = new int[row + column];
        int i, j;
        for(i = 0; i < row + column; i++){
            index[i] = i;
        }
        L = row;
        a = new double*[row + 2];
        for(i = 0; i < row + 2; i++){
            a[i] = new double[column + 4];
        }
        for(i = 0; i < row; i++){
            for(j = 0; j < column - 1; j++){
                a[i][j] = -A[i][j];
            }
            a[i][column-1] = 1;
    	    a[i][column] = b[i];
    	    if(a[L][column] > a[i][column]) L = i;
        }
        for(j = 0; j < column - 1; j++){
            a[row][j] = c[j];
        }
    	a[row+1][column-1] = -1;
    }

    void solve(){
        int E, i, j;
        int* ls = new int[column + 2];
        for(E = column - 1;;){
    	    if(L < row){
                swap(index[E], index[L + column]);
        		a[L][E] = 1 / a[L][E];
                int prv = column + 1;
                for(j = 0; j < column + 1; j++){
                    if(j != E){
                        a[L][j] *= -a[L][E];
                        if(abs(a[L][j]) > EPS) ls[prv] = j, prv = j;
                    }
                }
                ls[prv] = column + 1;
        		for(i = 0; i < row + 2; i++){
                    if(abs(a[i][E]) < EPS || i == L) continue;
                    for(j = ls[column + 1]; j < column + 1; j = ls[j]){
                        a[i][j] += a[i][E] * a[L][j];
                    }
                    a[i][E] *= a[L][E];
        		}
    	    }
    	    E = -1;
            double pre = EPS;
    	    for(j = 0; j < column; j++){
                if(E < 0 || index[E] > index[j]){
                    if(a[row + 1][j] > pre) E = j, pre = a[row + 1][j];
                    else if(abs(a[row + 1][j]) < EPS && a[row][j] > pre) E = j, pre = a[row][j];
                }
            }
    	    if(E < 0) break;
            L = -1;
            for(i = 0; i < row; i++){
                if(a[i][E] < -EPS){
                    if(L < 0 || a[L][column] / a[L][E] - a[i][column] / a[i][E] < EPS) L = i;
                }
            }
            if(L < 0){
                infinity = true;
                return;
            }
    	}
    	if(a[row + 1][column] < -EPS){
    	    none = true;
    	    return;
    	}
    	x.assign(column - 1, 0);
        for(i = 0; i < row; i++){
            if(index[column + i] < column - 1) x[index[column + i]] = a[i][column];
        }
    	ans = a[row][column];
    }
public:
    bool infinity, none;
    double ans;
    Arr x;
    Simplex(const Mat& A, const Arr& b, const Arr& c){
        Set(A,b,c);
        solve();
    }
};

double dir(int x1, int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}

double d[MAX_N][MAX_N];
int x[MAX_N], y[MAX_N];

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    int m = n*(n-1)/2;
    vvd A(m,vd(n));
    vd b(m);
    vd c(n,1);
    int id = 0;
    rep(i,n){
        srep(j,i+1,n){
            A[id][i] = A[id][j] = 1;
            b[id++] = dir(x[i],y[i],x[j],y[j]);
        }
    }
    Simplex sp(A,b,c);
    printf("%.12lf\n",2*sp.ans*PI);
    return 0;
}
accuracy: 1
time_ms: 110
memory_kb: 33712
final_rank: 3

code_snippet: #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define double float
 
using namespace std;
 
typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;
 
const int MAX_N = 205;
constexpr double PI = acos(-1);
 
// max c * x s.t. A*x <= b, x >= 0
class Simplex {
private:
    using Arr = vector<double>;
    using Mat = vector<vector<double> >;
    int* index;
    double** a;
    int row, column, L;
 
    void Set(const Mat& A, const Arr& b, const Arr& c){
        infinity = none = false;
        row = A.size(),column = A[0].size() + 1;
        index = new int[row + column];
        int i, j;
        for(i = 0; i < row + column; i++){
            index[i] = i;
        }
        L = row;
        a = new double*[row + 2];
        for(i = 0; i < row + 2; i++){
            a[i] = new double[column + 4];
        }
        for(i = 0; i < row; i++){
            for(j = 0; j < column - 1; j++){
                a[i][j] = -A[i][j];
            }
            a[i][column-1] = 1;
            a[i][column] = b[i];
            if(a[L][column] > a[i][column]) L = i;
        }
        for(j = 0; j < column - 1; j++){
            a[row][j] = c[j];
        }
        a[row+1][column-1] = -1;
    }
 
    void solve(){
        int E, i, j;
        for(E = column - 1;;){
            if(L < row){
                swap(index[E], index[L + column]);
                a[L][E] = 1 / a[L][E];
                for(j = 0; j < column + 1; j++){
                    if(j != E) a[L][j] *= -a[L][E];
                }
                for(i = 0; i < row + 2; i++){
                    if(abs(a[i][E]) < EPS || i == L) continue;
                    for(j = -1; j < column + 1;){
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                    }
                    a[i][E] = a[i][E] * a[L][E];
                }
            }
            E = -1;
            double pre = EPS;
            for(j = 0; j < column; j++){
                if(E < 0 || index[E] > index[j]){
                    if(a[row + 1][j] > pre) E = j, pre = a[row + 1][j];
                    else if(abs(a[row + 1][j]) < EPS && a[row][j] > pre) E = j, pre = a[row][j];
                }
            }
            if(E < 0) break;
            L = -1;
            for(i = 0; i < row; i++){
                if(a[i][E] < -EPS){
                    if(L < 0 || a[L][column] / a[L][E] - a[i][column] / a[i][E] < EPS) L = i;
                }
            }
            if(L < 0){
                infinity = true;
                return;
            }
        }
        if(a[row + 1][column] < -EPS){
            none = true;
            return;
        }
        x.assign(column - 1, 0);
        for(i = 0; i < row; i++){
            if(index[column + i] < column - 1) x[index[column + i]] = a[i][column];
        }
        ans = a[row][column];
    }
public:
    bool infinity, none;
    double ans;
    Arr x;
    Simplex(const Mat& A, const Arr& b, const Arr& c){
        Set(A,b,c);
        solve();
    }
};
 
double dir(int x1, int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
 
double d[MAX_N][MAX_N];
int x[MAX_N], y[MAX_N];
 
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    int m = n*(n-1)/2;
    vvd A(m,vd(n));
    vd b(m);
    vd c(n,1);
    int id = 0;
    rep(i,n){
        srep(j,i+1,n){
            A[id][i] = A[id][j] = 1;
            b[id++] = dir(x[i],y[i],x[j],y[j]);
        }
    }
    Simplex sp(A,b,c);
    printf("%.12lf\n",2*sp.ans*PI);
    return 0;
}
accuracy: 1
time_ms: 190
memory_kb: 33540
final_rank: 6

code_snippet: #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define double float
 
using namespace std;
 
typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;
 
const int MAX_N = 205;
constexpr double PI = acos(-1);
 
// max c * x s.t. A*x <= b, x >= 0
class Simplex {
private:
    using Arr = vector<double>;
    using Mat = vector<vector<double> >;
    int* index;
    double** a;
    int row, column, L;
 
    void Set(const Mat& A, const Arr& b, const Arr& c){
        infinity = none = false;
        row = A.size(),column = A[0].size() + 1;
        index = new int[row + column];
        int i, j;
        for(i = 0; i < row + column; i++){
            index[i] = i;
        }
        L = row;
        a = new double*[row + 2];
        for(i = 0; i < row + 2; i++){
            a[i] = new double[column + 4];
        }
        for(i = 0; i < row; i++){
            for(j = 0; j < column - 1; j++){
                a[i][j] = -A[i][j];
            }
            a[i][column-1] = 1;
            a[i][column] = b[i];
            if(a[L][column] > a[i][column]) L = i;
        }
        for(j = 0; j < column - 1; j++){
            a[row][j] = c[j];
        }
        a[row+1][column-1] = -1;
    }
 
    void solve(){
        int E, i, j;
        for(E = column - 1;;){
            if(L < row){
                swap(index[E], index[L + column]);
                a[L][E] = 1 / a[L][E];
                for(j = 0; j < column + 1; j++){
                    if(j != E) a[L][j] *= -a[L][E];
                }
                for(i = 0; i < row + 2; i++){
                    if(abs(a[i][E]) < EPS || i == L) continue;
                    for(j = -1; j < column + 1;){
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                    }
                    a[i][E] = a[i][E] * a[L][E];
                }
            }
            E = -1;
            double pre = EPS;
            for(j = 0; j < column; j++){
                if(E < 0 || index[E] > index[j]){
                    if(a[row + 1][j] > pre) E = j, pre = a[row + 1][j];
                    else if(abs(a[row + 1][j]) < EPS && a[row][j] > pre) E = j, pre = a[row][j];
                }
            }
            if(E < 0) break;
            L = -1;
            for(i = 0; i < row; i++){
                if(a[i][E] < -EPS){
                    if(L < 0 || a[L][column] / a[L][E] - a[i][column] / a[i][E] < EPS) L = i;
                }
            }
            if(L < 0){
                infinity = true;
                return;
            }
        }
        if(a[row + 1][column] < -EPS){
            none = true;
            return;
        }
        x.assign(column - 1, 0);
        for(i = 0; i < row; i++){
            if(index[column + i] < column - 1) x[index[column + i]] = a[i][column];
        }
        ans = a[row][column];
    }
public:
    bool infinity, none;
    double ans;
    Arr x;
    Simplex(const Mat& A, const Arr& b, const Arr& c){
        Set(A,b,c);
        solve();
    }
};
 
double dir(int x1, int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
 
double d[MAX_N][MAX_N];
int x[MAX_N], y[MAX_N];
 
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    int m = n*(n-1)/2;
    vvd A(m,vd(n));
    vd b(m);
    vd c(n,1);
    int id = 0;
    rep(i,n){
        srep(j,i+1,n){
            A[id][i] = A[id][j] = 1;
            b[id++] = dir(x[i],y[i],x[j],y[j]);
        }
    }
    Simplex sp(A,b,c);
    printf("%.12lf\n",2*sp.ans*PI);
    return 0;
}
accuracy: 1
time_ms: 210
memory_kb: 33800
final_rank: 8

code_snippet: #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define double float
 
using namespace std;
 
typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;
 
const int MAX_N = 205;
constexpr double PI = acos(-1);
 
// max c * x s.t. A*x <= b, x >= 0
class Simplex {
private:
    using Arr = vector<double>;
    using Mat = vector<vector<double> >;
    int* index;
    double** a;
    int row, column, L;
 
    void Set(const Mat& A, const Arr& b, const Arr& c){
        infinity = none = false;
        row = A.size(),column = A[0].size() + 1;
        index = new int[row + column];
        int i, j;
        for(i = 0; i < row + column; i++){
            index[i] = i;
        }
        L = row;
        a = new double*[row + 2];
        for(i = 0; i < row + 2; i++){
            a[i] = new double[column + 4];
        }
        for(i = 0; i < row; i++){
            for(j = 0; j < column - 1; j++){
                a[i][j] = -A[i][j];
            }
            a[i][column-1] = 1;
            a[i][column] = b[i];
            if(a[L][column] > a[i][column]) L = i;
        }
        for(j = 0; j < column - 1; j++){
            a[row][j] = c[j];
        }
        a[row+1][column-1] = -1;
    }
 
    void solve(){
        int E, i, j;
        for(E = column - 1;;){
            if(L < row){
                swap(index[E], index[L + column]);
                a[L][E] = 1 / a[L][E];
                for(j = 0; j < column + 1; j++){
                    if(j != E) a[L][j] *= -a[L][E];
                }
                for(i = 0; i < row + 2; i++){
                    if(abs(a[i][E]) < EPS || i == L) continue;
                    for(j = -1; j < column + 1;){
                        (++j^E)?(a[i][j] += a[i][E] * a[L][j]):0.0;
                        (++j^E)?(a[i][j] += a[i][E] * a[L][j]):0.0;
                        (++j^E)?(a[i][j] += a[i][E] * a[L][j]):0.0;
                        (++j^E)?(a[i][j] += a[i][E] * a[L][j]):0.0;
                    }
                    a[i][E] = a[i][E] * a[L][E];
                }
            }
            E = -1;
            double pre = EPS;
            for(j = 0; j < column; j++){
                if(E < 0 || index[E] > index[j]){
                    if(a[row + 1][j] > pre) E = j, pre = a[row + 1][j];
                    else if(abs(a[row + 1][j]) < EPS && a[row][j] > pre) E = j, pre = a[row][j];
                }
            }
            if(E < 0) break;
            L = -1;
            for(i = 0; i < row; i++){
                if(a[i][E] < -EPS){
                    if(L < 0 || a[L][column] / a[L][E] - a[i][column] / a[i][E] < EPS) L = i;
                }
            }
            if(L < 0){
                infinity = true;
                return;
            }
        }
        if(a[row + 1][column] < -EPS){
            none = true;
            return;
        }
        x.assign(column - 1, 0);
        for(i = 0; i < row; i++){
            if(index[column + i] < column - 1) x[index[column + i]] = a[i][column];
        }
        ans = a[row][column];
    }
public:
    bool infinity, none;
    double ans;
    Arr x;
    Simplex(const Mat& A, const Arr& b, const Arr& c){
        Set(A,b,c);
        solve();
    }
};
 
double dir(int x1, int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
 
double d[MAX_N][MAX_N];
int x[MAX_N], y[MAX_N];
 
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    int m = n*(n-1)/2;
    vvd A(m,vd(n));
    vd b(m);
    vd c(n,1);
    int id = 0;
    rep(i,n){
        srep(j,i+1,n){
            A[id][i] = A[id][j] = 1;
            b[id++] = dir(x[i],y[i],x[j],y[j]);
        }
    }
    Simplex sp(A,b,c);
    printf("%.12lf\n",2*sp.ans*PI);
    return 0;
}
accuracy: 1
time_ms: 170
memory_kb: 33556
final_rank: 4

code_snippet: #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define double float
 
using namespace std;
 
typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;
 
const int MAX_N = 205;
constexpr double PI = acos(-1);
 
// max c * x s.t. A*x <= b, x >= 0
class Simplex {
private:
    using Arr = vector<double>;
    using Mat = vector<vector<double> >;
    int* index;
    double** a;
    int row, column, L;
 
    void Set(const Mat& A, const Arr& b, const Arr& c){
        infinity = none = false;
        row = A.size(),column = A[0].size() + 1;
        index = new int[row + column];
        int i, j;
        for(i = 0; i < row + column; i++){
            index[i] = i;
        }
        L = row;
        a = new double*[row + 2];
        for(i = 0; i < row + 2; i++){
            a[i] = new double[column + 4];
        }
        for(i = 0; i < row; i++){
            for(j = 0; j < column - 1; j++){
                a[i][j] = -A[i][j];
            }
            a[i][column-1] = 1;
            a[i][column] = b[i];
            if(a[L][column] > a[i][column]) L = i;
        }
        for(j = 0; j < column - 1; j++){
            a[row][j] = c[j];
        }
        a[row+1][column-1] = -1;
    }
 
    void solve(){
        int E, i, j;
        for(E = column - 1;;){
            if(L < row){
                swap(index[E], index[L + column]);
                a[L][E] = 1 / a[L][E];
                for(j = 0; j < column + 1; j++){
                    if(j != E) a[L][j] *= -a[L][E];
                }
                for(i = 0; i < row + 2; i++){
                    if(abs(a[i][E]) < EPS || i == L) continue;
                    for(j = -1; j < column + 1;){
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                        if(++j^E) a[i][j] += a[i][E] * a[L][j];
                    }
                    a[i][E] = a[i][E] * a[L][E];
                }
            }
            E = -1;
            double pre = EPS;
            for(j = 0; j < column; j++){
                if(E < 0 || index[E] > index[j]){
                    if(a[row + 1][j] > pre) E = j, pre = a[row + 1][j];
                    else if(abs(a[row + 1][j]) < EPS && a[row][j] > pre) E = j, pre = a[row][j];
                }
            }
            if(E < 0) break;
            L = -1;
            for(i = 0; i < row; i++){
                if(a[i][E] < -EPS){
                    if(L < 0 || a[L][column] / a[L][E] - a[i][column] / a[i][E] < EPS) L = i;
                }
            }
            if(L < 0){
                infinity = true;
                return;
            }
        }
        if(a[row + 1][column] < -EPS){
            none = true;
            return;
        }
        x.assign(column - 1, 0);
        for(i = 0; i < row; i++){
            if(index[column + i] < column - 1) x[index[column + i]] = a[i][column];
        }
        ans = a[row][column];
    }
public:
    bool infinity, none;
    double ans;
    Arr x;
    Simplex(const Mat& A, const Arr& b, const Arr& c){
        Set(A,b,c);
        solve();
    }
};
 
double dir(int x1, int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
 
double d[MAX_N][MAX_N];
int x[MAX_N], y[MAX_N];
 
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    int m = n*(n-1)/2;
    vvd A(m,vd(n));
    vd b(m);
    vd c(n,1);
    int id = 0;
    rep(i,n){
        srep(j,i+1,n){
            A[id][i] = A[id][j] = 1;
            b[id++] = dir(x[i],y[i],x[j],y[j]);
        }
    }
    Simplex sp(A,b,c);
    printf("%.12lf\n",2*sp.ans*PI);
    return 0;
}
accuracy: 1
time_ms: 170
memory_kb: 33700
final_rank: 5

code_snippet: #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define double float

using namespace std;

typedef pair<int,int> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;

const int MAX_N = 205;
constexpr double PI = acos(-1);

// max c * x s.t. A*x <= b, x >= 0
class Simplex {
private:
    using Arr = vector<double>;
    using Mat = vector<vector<double> >;
    int* index;
    double** a;
    int row, column, L;

    void Set(const Mat& A, const Arr& b, const Arr& c){
        infinity = none = false;
        row = A.size(),column = A[0].size() + 1;
        index = new int[row + column];
        int i, j;
        for(i = 0; i < row + column; i++){
            index[i] = i;
        }
        L = row;
        a = new double*[row + 2];
        for(i = 0; i < row + 2; i++){
            a[i] = new double[column + 4];
        }
        for(i = 0; i < row; i++){
            for(j = 0; j < column - 1; j++){
                a[i][j] = -A[i][j];
            }
            a[i][column-1] = 1;
    	    a[i][column] = b[i];
    	    if(a[L][column] > a[i][column]) L = i;
        }
        for(j = 0; j < column - 1; j++){
            a[row][j] = c[j];
        }
    	a[row+1][column-1] = -1;
    }

    void solve(){
        int E, i, j;
        for(E = column - 1;;){
    	    if(L < row){
                swap(index[E], index[L + column]);
        		a[L][E] = 1 / a[L][E];
                for(j = 0; j < column + 1; j++){
                    if(j != E) a[L][j] *= -a[L][E];
                }
        		for(i = 0; i < row + 2; i++){
                    if(abs(a[i][E]) < EPS || i == L) continue;
                    for(j = 0; j < column + 1; j += 4){
                        if(j != E) a[i][j] += a[i][E] * a[L][j];
                        if(j+1 != E) a[i][j+1] += a[i][E] * a[L][j+1];
                        if(j+2 != E) a[i][j+2] += a[i][E] * a[L][j+2];
                        if(j+3 != E) a[i][j+3] += a[i][E] * a[L][j+3];
                    }
                    a[i][E] = a[i][E] * a[L][E];
        		}
    	    }
    	    E = -1;
            double pre = EPS;
    	    for(j = 0; j < column; j++){
                if(E < 0 || index[E] > index[j]){
                    if(a[row + 1][j] > pre) E = j, pre = a[row + 1][j];
                    else if(abs(a[row + 1][j]) < EPS && a[row][j] > pre) E = j, pre = a[row][j];
                }
            }
    	    if(E < 0) break;
            L = -1;
            for(i = 0; i < row; i++){
                if(a[i][E] < -EPS){
                    if(L < 0 || a[L][column] / a[L][E] - a[i][column] / a[i][E] < EPS) L = i;
                }
            }
            if(L < 0){
                infinity = true;
                return;
            }
    	}
    	if(a[row + 1][column] < -EPS){
    	    none = true;
    	    return;
    	}
    	x.assign(column - 1, 0);
        for(i = 0; i < row; i++){
            if(index[column + i] < column - 1) x[index[column + i]] = a[i][column];
        }
    	ans = a[row][column];
    }
public:
    bool infinity, none;
    double ans;
    Arr x;
    Simplex(const Mat& A, const Arr& b, const Arr& c){
        Set(A,b,c);
        solve();
    }
};

double dir(int x1, int y1, int x2, int y2)
{
    return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}

double d[MAX_N][MAX_N];
int x[MAX_N], y[MAX_N];

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    rep(i,n){
        cin >> x[i] >> y[i];
    }
    int m = n*(n-1)/2;
    vvd A(m,vd(n));
    vd b(m);
    vd c(n,1);
    int id = 0;
    rep(i,n){
        srep(j,i+1,n){
            A[id][i] = A[id][j] = 1;
            b[id++] = dir(x[i],y[i],x[j],y[j]);
        }
    }
    Simplex sp(A,b,c);
    printf("%.12lf\n",2*sp.ans*PI);
    return 0;
}
accuracy: 1
time_ms: 200
memory_kb: 33700
final_rank: 7