QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#734133#3055. Laser CuttermaspyAC ✓9ms4960kbC++2318.9kb2024-11-11 01:26:572024-11-11 01:27:03

Judging History

你现在查看的是最新测评结果

  • [2024-11-11 01:27:03]
  • 评测
  • 测评结果:AC
  • 用时:9ms
  • 内存:4960kb
  • [2024-11-11 01:26:57]
  • 提交

answer

#line 1 "library/my_template.hpp"
#if defined(LOCAL)
#include <my_template_compiled.hpp>
#else
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using u32 = unsigned int;
using u64 = unsigned long long;
using i128 = __int128;

template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'000'000'000;
template <>
constexpr ll infty<ll> = ll(infty<int>) * infty<int> * 2;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * infty<ll>;
template <>
constexpr double infty<double> = infty<ll>;
template <>
constexpr long double infty<long double> = infty<ll>;

using pi = pair<ll, ll>;
using vi = vector<ll>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vector<vc<T>>;
template <class T>
using vvvc = vector<vvc<T>>;
template <class T>
using vvvvc = vector<vvvc<T>>;
template <class T>
using vvvvvc = vector<vvvvc<T>>;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;

#define vv(type, name, h, ...) \
  vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define vvv(type, name, h, w, ...)   \
  vector<vector<vector<type>>> name( \
      h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...)       \
  vector<vector<vector<vector<type>>>> name( \
      a, vector<vector<vector<type>>>(       \
             b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))

// https://trap.jp/post/1224/
#define FOR1(a) for (ll _ = 0; _ < ll(a); ++_)
#define FOR2(i, a) for (ll i = 0; i < ll(a); ++i)
#define FOR3(i, a, b) for (ll i = a; i < ll(b); ++i)
#define FOR4(i, a, b, c) for (ll i = a; i < ll(b); i += (c))
#define FOR1_R(a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR2_R(i, a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR3_R(i, a, b) for (ll i = (b)-1; i >= ll(a); --i)
#define overload4(a, b, c, d, e, ...) e
#define overload3(a, b, c, d, ...) d
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FOR_R(...) overload3(__VA_ARGS__, FOR3_R, FOR2_R, FOR1_R)(__VA_ARGS__)

#define FOR_subset(t, s) \
  for (ll t = (s); t >= 0; t = (t == 0 ? -1 : (t - 1) & (s)))
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define elif else if

#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second

#define stoi stoll

int popcnt(int x) { return __builtin_popcount(x); }
int popcnt(u32 x) { return __builtin_popcount(x); }
int popcnt(ll x) { return __builtin_popcountll(x); }
int popcnt(u64 x) { return __builtin_popcountll(x); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 1, 2)
int topbit(int x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(u32 x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(ll x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
int topbit(u64 x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 0, 2)
int lowbit(int x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(u32 x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(ll x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
int lowbit(u64 x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }

template <typename T, typename U>
T ceil(T x, U y) {
  return (x > 0 ? (x + y - 1) / y : x / y);
}
template <typename T, typename U>
T floor(T x, U y) {
  return (x > 0 ? x / y : (x - y + 1) / y);
}
template <typename T, typename U>
pair<T, T> divmod(T x, U y) {
  T q = floor(x, y);
  return {q, x - q * y};
}

template <typename T, typename U>
T SUM(const vector<U> &A) {
  T sum = 0;
  for (auto &&a: A) sum += a;
  return sum;
}

#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define LB(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define UB(c, x) distance((c).begin(), upper_bound(all(c), (x)))
#define UNIQUE(x) \
  sort(all(x)), x.erase(unique(all(x)), x.end()), x.shrink_to_fit()

template <typename T>
T POP(deque<T> &que) {
  T a = que.front();
  que.pop_front();
  return a;
}
template <typename T>
T POP(pq<T> &que) {
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(pqg<T> &que) {
  assert(!que.empty());
  T a = que.top();
  que.pop();
  return a;
}
template <typename T>
T POP(vc<T> &que) {
  assert(!que.empty());
  T a = que.back();
  que.pop_back();
  return a;
}

template <typename F>
ll binary_search(F check, ll ok, ll ng, bool check_ok = true) {
  if (check_ok) assert(check(ok));
  while (abs(ok - ng) > 1) {
    auto x = (ng + ok) / 2;
    tie(ok, ng) = (check(x) ? mp(x, ng) : mp(ok, x));
  }
  return ok;
}
template <typename F>
double binary_search_real(F check, double ok, double ng, int iter = 100) {
  FOR(iter) {
    double x = (ok + ng) / 2;
    tie(ok, ng) = (check(x) ? mp(x, ng) : mp(ok, x));
  }
  return (ok + ng) / 2;
}

template <class T, class S>
inline bool chmax(T &a, const S &b) {
  return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
  return (a > b ? a = b, 1 : 0);
}

// ? は -1
vc<int> s_to_vi(const string &S, char first_char) {
  vc<int> A(S.size());
  FOR(i, S.size()) { A[i] = (S[i] != '?' ? S[i] - first_char : -1); }
  return A;
}

template <typename T, typename U>
vector<T> cumsum(vector<U> &A, int off = 1) {
  int N = A.size();
  vector<T> B(N + 1);
  FOR(i, N) { B[i + 1] = B[i] + A[i]; }
  if (off == 0) B.erase(B.begin());
  return B;
}

// stable sort
template <typename T>
vector<int> argsort(const vector<T> &A) {
  vector<int> ids(len(A));
  iota(all(ids), 0);
  sort(all(ids),
       [&](int i, int j) { return (A[i] == A[j] ? i < j : A[i] < A[j]); });
  return ids;
}

// A[I[0]], A[I[1]], ...
template <typename T>
vc<T> rearrange(const vc<T> &A, const vc<int> &I) {
  vc<T> B(len(I));
  FOR(i, len(I)) B[i] = A[I[i]];
  return B;
}
#endif
#line 1 "library/other/io.hpp"
// based on yosupo's fastio
#include <unistd.h>

namespace fastio {
#define FASTIO
// クラスが read(), print() を持っているかを判定するメタ関数
struct has_write_impl {
  template <class T>
  static auto check(T &&x) -> decltype(x.write(), std::true_type{});

  template <class T>
  static auto check(...) -> std::false_type;
};

template <class T>
class has_write : public decltype(has_write_impl::check<T>(std::declval<T>())) {
};

struct has_read_impl {
  template <class T>
  static auto check(T &&x) -> decltype(x.read(), std::true_type{});

  template <class T>
  static auto check(...) -> std::false_type;
};

template <class T>
class has_read : public decltype(has_read_impl::check<T>(std::declval<T>())) {};

struct Scanner {
  FILE *fp;
  char line[(1 << 15) + 1];
  size_t st = 0, ed = 0;
  void reread() {
    memmove(line, line + st, ed - st);
    ed -= st;
    st = 0;
    ed += fread(line + ed, 1, (1 << 15) - ed, fp);
    line[ed] = '\0';
  }
  bool succ() {
    while (true) {
      if (st == ed) {
        reread();
        if (st == ed) return false;
      }
      while (st != ed && isspace(line[st])) st++;
      if (st != ed) break;
    }
    if (ed - st <= 50) {
      bool sep = false;
      for (size_t i = st; i < ed; i++) {
        if (isspace(line[i])) {
          sep = true;
          break;
        }
      }
      if (!sep) reread();
    }
    return true;
  }
  template <class T, enable_if_t<is_same<T, string>::value, int> = 0>
  bool read_single(T &ref) {
    if (!succ()) return false;
    while (true) {
      size_t sz = 0;
      while (st + sz < ed && !isspace(line[st + sz])) sz++;
      ref.append(line + st, sz);
      st += sz;
      if (!sz || st != ed) break;
      reread();
    }
    return true;
  }
  template <class T, enable_if_t<is_integral<T>::value, int> = 0>
  bool read_single(T &ref) {
    if (!succ()) return false;
    bool neg = false;
    if (line[st] == '-') {
      neg = true;
      st++;
    }
    ref = T(0);
    while (isdigit(line[st])) { ref = 10 * ref + (line[st++] & 0xf); }
    if (neg) ref = -ref;
    return true;
  }
  template <typename T,
            typename enable_if<has_read<T>::value>::type * = nullptr>
  inline bool read_single(T &x) {
    x.read();
    return true;
  }
  bool read_single(double &ref) {
    string s;
    if (!read_single(s)) return false;
    ref = std::stod(s);
    return true;
  }
  bool read_single(char &ref) {
    string s;
    if (!read_single(s) || s.size() != 1) return false;
    ref = s[0];
    return true;
  }
  template <class T>
  bool read_single(vector<T> &ref) {
    for (auto &d: ref) {
      if (!read_single(d)) return false;
    }
    return true;
  }
  template <class T, class U>
  bool read_single(pair<T, U> &p) {
    return (read_single(p.first) && read_single(p.second));
  }
  template <size_t N = 0, typename T>
  void read_single_tuple(T &t) {
    if constexpr (N < std::tuple_size<T>::value) {
      auto &x = std::get<N>(t);
      read_single(x);
      read_single_tuple<N + 1>(t);
    }
  }
  template <class... T>
  bool read_single(tuple<T...> &tpl) {
    read_single_tuple(tpl);
    return true;
  }
  void read() {}
  template <class H, class... T>
  void read(H &h, T &... t) {
    bool f = read_single(h);
    assert(f);
    read(t...);
  }
  Scanner(FILE *fp) : fp(fp) {}
};

struct Printer {
  Printer(FILE *_fp) : fp(_fp) {}
  ~Printer() { flush(); }

  static constexpr size_t SIZE = 1 << 15;
  FILE *fp;
  char line[SIZE], small[50];
  size_t pos = 0;
  void flush() {
    fwrite(line, 1, pos, fp);
    pos = 0;
  }
  void write(const char val) {
    if (pos == SIZE) flush();
    line[pos++] = val;
  }
  template <class T, enable_if_t<is_integral<T>::value, int> = 0>
  void write(T val) {
    if (pos > (1 << 15) - 50) flush();
    if (val == 0) {
      write('0');
      return;
    }
    if (val < 0) {
      write('-');
      val = -val; // todo min
    }
    size_t len = 0;
    while (val) {
      small[len++] = char(0x30 | (val % 10));
      val /= 10;
    }
    for (size_t i = 0; i < len; i++) { line[pos + i] = small[len - 1 - i]; }
    pos += len;
  }
  void write(const string s) {
    for (char c: s) write(c);
  }
  void write(const char *s) {
    size_t len = strlen(s);
    for (size_t i = 0; i < len; i++) write(s[i]);
  }
  void write(const double x) {
    ostringstream oss;
    oss << fixed << setprecision(15) << x;
    string s = oss.str();
    write(s);
  }
  void write(const long double x) {
    ostringstream oss;
    oss << fixed << setprecision(15) << x;
    string s = oss.str();
    write(s);
  }
  template <typename T,
            typename enable_if<has_write<T>::value>::type * = nullptr>
  inline void write(T x) {
    x.write();
  }
  template <class T>
  void write(const vector<T> val) {
    auto n = val.size();
    for (size_t i = 0; i < n; i++) {
      if (i) write(' ');
      write(val[i]);
    }
  }
  template <class T, class U>
  void write(const pair<T, U> val) {
    write(val.first);
    write(' ');
    write(val.second);
  }
  template <size_t N = 0, typename T>
  void write_tuple(const T t) {
    if constexpr (N < std::tuple_size<T>::value) {
      if constexpr (N > 0) { write(' '); }
      const auto x = std::get<N>(t);
      write(x);
      write_tuple<N + 1>(t);
    }
  }
  template <class... T>
  bool write(tuple<T...> tpl) {
    write_tuple(tpl);
    return true;
  }
  template <class T, size_t S>
  void write(const array<T, S> val) {
    auto n = val.size();
    for (size_t i = 0; i < n; i++) {
      if (i) write(' ');
      write(val[i]);
    }
  }
  void write(i128 val) {
    string s;
    bool negative = 0;
    if (val < 0) {
      negative = 1;
      val = -val;
    }
    while (val) {
      s += '0' + int(val % 10);
      val /= 10;
    }
    if (negative) s += "-";
    reverse(all(s));
    if (len(s) == 0) s = "0";
    write(s);
  }
};
Scanner scanner = Scanner(stdin);
Printer printer = Printer(stdout);
void flush() { printer.flush(); }
void print() { printer.write('\n'); }
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
  printer.write(head);
  if (sizeof...(Tail)) printer.write(' ');
  print(forward<Tail>(tail)...);
}

void read() {}
template <class Head, class... Tail>
void read(Head &head, Tail &... tail) {
  scanner.read(head);
  read(tail...);
}
} // namespace fastio
using fastio::print;
using fastio::flush;
using fastio::read;

#define INT(...)   \
  int __VA_ARGS__; \
  read(__VA_ARGS__)
#define LL(...)   \
  ll __VA_ARGS__; \
  read(__VA_ARGS__)
#define STR(...)      \
  string __VA_ARGS__; \
  read(__VA_ARGS__)
#define CHAR(...)   \
  char __VA_ARGS__; \
  read(__VA_ARGS__)
#define DBL(...)      \
  double __VA_ARGS__; \
  read(__VA_ARGS__)

#define VEC(type, name, size) \
  vector<type> name(size);    \
  read(name)
#define VV(type, name, h, w)                     \
  vector<vector<type>> name(h, vector<type>(w)); \
  read(name)

void YES(bool t = 1) { print(t ? "YES" : "NO"); }
void NO(bool t = 1) { YES(!t); }
void Yes(bool t = 1) { print(t ? "Yes" : "No"); }
void No(bool t = 1) { Yes(!t); }
void yes(bool t = 1) { print(t ? "yes" : "no"); }
void no(bool t = 1) { yes(!t); }
#line 3 "main.cpp"

#line 1 "library/flow/hungarian.hpp"
// 最小重み最大マッチング。O(N^2M) time。
// ポテンシャルは次の双対問題の解である:
//   maximize \sum x_i + \sum y_j, subj to x_i + y_j\leq C_{ij}
// returns:
//   (ans, match, X, Y)
template <typename T>
tuple<T, vc<int>, vc<T>, vc<T>> hungarian(vvc<T>& C) {
  int N = len(C);
  int M = len(C[0]);
  assert(N <= M);
  vv(T, A, N + 1, M + 1);
  FOR(i, N) FOR(j, M) A[1 + i][1 + j] = C[i][j];
  ++N, ++M;

  vector<int> P(M), way(M);
  vector<T> X(N), Y(M);
  vc<T> minV;
  vc<bool> used;

  for (int i = 1; i < N; i++) {
    P[0] = i;
    minV.assign(M, infty<T>);
    used.assign(M, false);
    int j0 = 0;
    while (P[j0] != 0) {
      int i0 = P[j0], j1 = 0;
      used[j0] = true;
      T delta = infty<T>;
      for (int j = 1; j < M; j++) {
        if (used[j]) continue;
        T curr = A[i0][j] - X[i0] - Y[j];
        if (curr < minV[j]) minV[j] = curr, way[j] = j0;
        if (minV[j] < delta) delta = minV[j], j1 = j;
      }
      for (int j = 0; j < M; j++) {
        if (used[j])
          X[P[j]] += delta, Y[j] -= delta;
        else
          minV[j] -= delta;
      }
      j0 = j1;
    }
    do {
      P[j0] = P[way[j0]];
      j0 = way[j0];
    } while (j0 != 0);
  }
  T res = -Y[0];
  X.erase(X.begin());
  Y.erase(Y.begin());
  vc<int> match(N);
  FOR(i, N) match[P[i]] = i;
  match.erase(match.begin());
  for (auto&& i: match) --i;
  return {res, match, X, Y};
}
#line 2 "library/geo/base.hpp"
template <typename T>
struct Point {
  T x, y;

  Point() = default;

  template <typename A, typename B>
  Point(A x, B y) : x(x), y(y) {}

  template <typename A, typename B>
  Point(pair<A, B> p) : x(p.fi), y(p.se) {}

  Point operator+(Point p) const { return {x + p.x, y + p.y}; }
  Point operator-(Point p) const { return {x - p.x, y - p.y}; }
  bool operator==(Point p) const { return x == p.x && y == p.y; }
  Point operator-() const { return {-x, -y}; }

  bool operator<(Point p) const {
    if (x != p.x) return x < p.x;
    return y < p.y;
  }
  T dot(Point other) { return x * other.x + y * other.y; }
  T det(Point other) { return x * other.y - y * other.x; }

  void read() { fastio::read(x), fastio::read(y); }
  void write() { fastio::printer.write(pair<T, T>({x, y})); }
};

// A -> B -> C と進むときに、左に曲がるならば +1、右に曲がるならば -1
template <typename T>
int ccw(Point<T> A, Point<T> B, Point<T> C) {
  T x = (B - A).det(C - A);
  if (x > 0) return 1;
  if (x < 0) return -1;
  return 0;
}

template <typename REAL, typename T>
REAL dist(Point<T> A, Point<T> B) {
  A = A - B;
  T p = A.dot(A);
  return sqrt(REAL(p));
}

template <typename T>
struct Line {
  T a, b, c;

  Line(T a, T b, T c) : a(a), b(b), c(c) {}
  Line(Point<T> A, Point<T> B) {
    a = A.y - B.y, b = B.x - A.x, c = A.x * B.y - A.y * B.x;
  }
  Line(T x1, T y1, T x2, T y2) : Line(Point<T>(x1, y1), Point<T>(x2, y2)) {}

  template <typename U>
  U eval(Point<U> P) {
    return a * P.x + b * P.y + c;
  }

  template <typename U>
  T eval(U x, U y) {
    return a * x + b * y + c;
  }

  bool is_parallel(Line other) { return a * other.b - b * other.a == 0; }

  bool is_orthogonal(Line other) { return a * other.a + b * other.b == 0; }
};

template <typename T>
struct Segment {
  Point<T> A, B;

  Segment(Point<T> A, Point<T> B) : A(A), B(B) {}
  Segment(T x1, T y1, T x2, T y2)
      : Segment(Point<T>(x1, y1), Point<T>(x2, y2)) {}

  template <enable_if_t<is_integral<T>::value, int> = 0>
  bool contain(Point<T> C) {
    T det = (C - A).det(B - A);
    if (det != 0) return 0;
    return (C - A).dot(B - A) >= 0 && (C - B).dot(A - B) >= 0;
  }

  Line<T> to_Line() { return Line(A, B); }
};

template <typename REAL>
struct Circle {
  Point<REAL> O;
  REAL r;
  Circle(Point<REAL> O, REAL r) : O(O), r(r) {}
  Circle(REAL x, REAL y, REAL r) : O(x, y), r(r) {}
  template <typename T>
  bool contain(Point<T> p) {
    REAL dx = p.x - O.x, dy = p.y - O.y;
    return dx * dx + dy * dy <= r * r;
  }
};

template <typename T>
struct Polygon {
  vc<Point<T>> points;
  T a;

  template <typename A, typename B>
  Polygon(vc<pair<A, B>> pairs) {
    for (auto&& [a, b]: pairs) points.eb(Point<T>(a, b));
    build();
  }
  Polygon(vc<Point<T>> points) : points(points) { build(); }

  int size() { return len(points); }

  template <typename REAL>
  REAL area() {
    return a * 0.5;
  }

  template <enable_if_t<is_integral<T>::value, int> = 0>
  T area_2() {
    return a;
  }

  bool is_convex() {
    FOR(j, len(points)) {
      int i = (j == 0 ? len(points) - 1 : j - 1);
      int k = (j == len(points) - 1 ? 0 : j + 1);
      if ((points[j] - points[i]).det(points[k] - points[j]) < 0) return false;
    }
    return true;
  }

private:
  void build() {
    a = 0;
    FOR(i, len(points)) {
      int j = (i + 1 == len(points) ? 0 : i + 1);
      a += points[i].det(points[j]);
    }
    if (a < 0) {
      a = -a;
      reverse(all(points));
    }
  }
};
#line 6 "main.cpp"

using Re = double;
using P = Point<Re>;

void solve() {
  LL(N);
  Re sx, sy;
  read(sx), read(sy);
  vc<P> A(N), B(N);
  FOR(i, N) read(A[i]), read(B[i]);
  vv(Re, mat, N, N);
  FOR(i, N) FOR(j, N) { mat[i][j] = dist<Re>(A[i], B[j]); }

  Re x = get<0>(hungarian<Re>(mat));
  FOR(i, N) x += dist<Re>(A[i], B[i]);
  print(x);
}

signed main() {
  solve();
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3936kb

input:

3
0 1
0 0 0 1
0 1 0 2
0 2 0 3

output:

6.000000000000000

result:

ok - 1 values

Test #2:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

2
0 1
0 0 0 2
-1 1 1 1

output:

6.828427124746190

result:

ok - 1 values

Test #3:

score: 0
Accepted
time: 0ms
memory: 3848kb

input:

5
0 0
0 0 1 0
1 1 -1 1
-1 1 -1 -1
-1 -1 1 -1
1 -1 1 1

output:

10.000000000000000

result:

ok - 1 values

Test #4:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

13
-50 -35
-47 13 -47 -7
-81 -25 78 62
54 -35 -4 83
-17 0 62 50
-65 -9 99 -43
-47 91 -50 -35
54 13 37 92
53 53 -12 89
-56 -74 60 53
-20 84 -19 -59
44 22 -70 -36
-69 -71 23 87
47 -55 -48 -8

output:

2154.840916479528460

result:

ok - 1 values

Test #5:

score: 0
Accepted
time: 0ms
memory: 4084kb

input:

44
43 14
43 14 35 -86
88 -51 -90 48
70 42 -9 -63
60 43 80 11
-57 -48 42 -45
-16 81 71 40
16 70 -55 92
-78 -34 43 -28
20 83 -68 5
-3 93 -99 12
76 -72 -21 -29
74 -51 81 13
-17 62 6 -28
-22 15 33 -61
12 -70 -59 -46
-93 5 96 10
33 -12 -96 -67
-88 -90 88 90
60 11 72 -47
75 -24 70 78
60 -43 2 -84
-17 21 8...

output:

6344.477755413188788

result:

ok - 1 values

Test #6:

score: 0
Accepted
time: 0ms
memory: 4000kb

input:

7
52 3
52 3 -42 70
59 87 37 -89
-2 -73 58 13
-88 21 17 -91
54 -36 -42 -85
-63 -49 -71 19
-53 -18 35 9

output:

1140.833600037073666

result:

ok - 1 values

Test #7:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

20
20 81
61 36 -63 4
-16 53 54 22
94 -67 -83 26
57 0 -27 -89
7 -10 72 -15
-1 -89 17 -38
39 50 -89 -37
-49 1 96 84
-39 67 37 -95
65 -83 81 97
-4 79 42 8
78 75 -69 -11
96 -17 56 15
58 99 -79 16
-91 31 51 95
17 79 37 -4
46 38 33 69
21 -28 -65 53
93 81 -44 81
13 39 43 96

output:

3065.371920828558359

result:

ok - 1 values

Test #8:

score: 0
Accepted
time: 0ms
memory: 3912kb

input:

33
30 30
70 25 61 -41
81 6 4 43
-46 -73 9 49
88 14 -65 -80
-69 14 6 -4
9 -71 -64 54
-97 -84 16 39
-96 -62 -8 -15
33 13 -24 81
-20 -12 -79 -73
4 -58 -40 -80
6 6 30 -92
50 47 -88 -57
-45 40 79 -77
-56 -7 -85 -94
30 30 93 100
-17 89 94 71
-17 42 -52 -83
-84 -100 -70 60
-73 55 46 -38
-42 -65 88 -55
9 -4...

output:

4485.571380213595148

result:

ok - 1 values

Test #9:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

46
67 -35
-1 50 -97 -65
67 -35 -70 75
-84 1 20 61
67 46 -99 18
45 35 17 74
-36 -19 39 19
47 -22 -49 72
-85 8 79 39
83 53 -57 42
16 -98 67 98
91 -18 -73 53
8 11 9 -25
15 86 -81 -100
-79 0 -28 22
84 9 37 6
69 83 -6 6
-57 51 -78 10
51 -85 15 17
72 4 38 -14
40 -81 40 -6
-29 -99 14 19
25 6 67 4
40 22 -98...

output:

6641.772650476134913

result:

ok - 1 values

Test #10:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

9
-87 -30
8 39 27 91
46 -74 4 66
13 56 -19 19
-2 -65 38 48
-20 -87 11 -37
100 -45 23 8
25 100 -53 -93
74 -68 -49 -21
-87 -30 -44 -97

output:

1375.809659653546305

result:

ok - 1 values

Test #11:

score: 0
Accepted
time: 0ms
memory: 3900kb

input:

22
72 31
17 72 6 25
-49 -1 47 48
64 -58 -54 45
-24 18 77 -35
20 48 -55 32
96 -82 -90 80
73 39 5 43
-88 42 -4 -4
-52 60 86 48
93 -21 15 81
29 47 -33 -24
52 -76 41 80
34 91 -39 8
17 99 46 75
23 -78 -84 60
94 74 85 -33
97 -85 52 31
-59 -38 65 68
79 27 -47 99
-22 -29 93 46
-16 47 -2 46
-7 -55 -91 46

output:

3560.008698663591076

result:

ok - 1 values

Test #12:

score: 0
Accepted
time: 0ms
memory: 4012kb

input:

35
-35 62
26 61 -71 -20
-31 -95 -26 92
6 -45 -82 77
42 -76 -43 -80
76 56 -49 48
36 -40 -60 -74
-35 -16 -7 45
32 23 -88 -38
78 -99 56 69
-5 89 62 -92
54 -95 -35 62
63 30 -93 -85
74 -84 17 61
-6 -75 -72 82
93 85 10 -70
-30 -9 75 -10
66 -32 -98 50
-88 45 -52 -71
-74 38 -23 -95
-7 -92 -44 51
-72 -87 78 ...

output:

6245.699544836763380

result:

ok - 1 values

Test #13:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

13
-52 -42
-86 -100 -49 3
-48 -48 -84 -85
-75 35 -55 -37
55 51 -98 -63
-97 -16 45 11
-14 29 1 -47
-22 -86 -100 -88
-73 -25 -74 -81
-18 -84 -61 -17
27 -70 -39 -61
-100 -36 20 -51
55 57 -14 -95
-23 -61 37 -17

output:

1769.011203655807321

result:

ok - 1 values

Test #14:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

28
-42 30
-77 92 -50 -42
-99 -13 -36 -28
53 79 -90 63
-6 69 -88 -62
77 93 -81 7
-40 33 71 -83
-80 -50 55 -2
40 98 43 33
84 -37 49 93
-37 90 67 8
58 -34 -28 81
80 -42 27 -97
-29 79 71 -21
91 -16 26 71
55 23 44 -46
-97 -58 -54 -14
-73 -15 23 -23
-35 -99 40 -25
15 -85 -39 18
34 -80 -54 13
-42 47 -42 12...

output:

4126.473197451005035

result:

ok - 1 values

Test #15:

score: 0
Accepted
time: 0ms
memory: 4092kb

input:

39
32 -9
-68 -78 54 93
15 -53 16 41
78 52 -73 48
73 13 -33 -89
-88 22 89 36
-1 -76 -77 75
-77 -24 -17 -61
93 82 -10 5
-1 -16 46 -81
-89 53 -20 -26
-17 -36 -10 -64
-9 2 -51 -92
10 -77 89 21
46 46 16 -97
-77 10 -76 -46
38 -6 58 41
-84 -84 -2 -1
100 -40 -59 -89
3 -87 -43 -71
22 -92 84 -9
-99 -63 10 -29...

output:

5992.309420289851914

result:

ok - 1 values

Test #16:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

4
99 -89
-59 -87 53 48
-88 68 31 -9
99 -89 39 48
-79 18 51 -44

output:

1059.563678864160693

result:

ok - 1 values

Test #17:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

15
33 49
71 -64 20 24
24 42 25 -36
75 38 38 -46
38 -19 -16 68
21 -99 66 49
57 -57 39 70
-66 -83 37 51
-50 -31 16 28
35 -21 -34 -94
-57 -48 70 -32
17 82 -90 -75
-62 -5 59 -33
68 67 -23 75
65 53 25 48
-25 -52 35 3

output:

2271.365215705830906

result:

ok - 1 values

Test #18:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

30
34 -33
80 -73 19 -21
97 -8 -88 -91
55 77 58 -42
83 -52 31 53
-48 57 -69 -87
-14 88 -74 -87
92 33 -36 -61
-21 -42 -41 66
42 -45 -76 -65
63 -8 -17 -65
31 -96 25 92
7 92 78 50
79 -94 12 -1
72 71 -86 -55
97 32 -75 82
81 35 83 -89
65 -40 100 -84
8 53 -1 97
50 -57 -69 -53
58 20 -68 0
-44 -26 -8 -49
82 ...

output:

5162.541908751876690

result:

ok - 1 values

Test #19:

score: 0
Accepted
time: 0ms
memory: 4084kb

input:

41
-22 -19
89 -42 -78 -87
90 37 -27 -75
37 63 87 5
81 -82 -90 67
86 17 -32 62
17 28 -48 95
96 -40 -58 -92
-20 16 23 -35
-14 14 95 -41
-70 10 -25 69
-23 15 -12 11
-82 -81 -48 -84
-75 -83 -61 8
-90 67 33 -77
95 54 -30 -100
91 68 17 -74
-52 37 23 76
-86 -35 7 43
75 68 -27 -78
68 37 -45 25
83 -72 29 -26...

output:

6376.644367175165826

result:

ok - 1 values

Test #20:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

6
25 63
98 -51 -79 69
-89 35 -68 80
90 28 -71 -32
62 -78 25 63
18 -44 -94 44
-70 -25 71 71

output:

1447.384112977647646

result:

ok - 1 values

Test #21:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

34
-96 -45
-14 -41 15 -27
-83 30 89 -89
19 -71 -10 -38
-46 -100 47 26
20 92 -92 -58
-100 4 -62 16
-54 7 -70 88
72 -42 27 -60
-22 -46 -98 -58
59 17 -30 -35
-2 -92 90 -30
-82 -25 -83 -47
52 -100 -12 82
75 -15 -21 48
-26 -11 -14 -44
-7 94 -8 14
18 3 44 -100
-29 8 -94 35
53 0 51 60
-40 -18 -71 60
31 59 ...

output:

4473.727827117969355

result:

ok - 1 values

Test #22:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

47
-22 -22
-5 -52 -62 -72
-36 -83 42 11
75 100 -62 -80
22 -59 -54 -6
-11 -3 36 -64
-14 -87 47 53
91 96 25 63
-94 -86 72 36
-14 -46 -31 -93
-24 -66 -64 -15
64 39 69 -10
-31 35 -13 -79
-35 14 15 30
90 -7 -92 15
100 -10 -84 -89
6 -45 -53 12
6 -1 45 38
-41 -39 51 50
-7 -22 88 11
-82 -56 51 -27
61 -13 -2...

output:

6462.351741273346306

result:

ok - 1 values

Test #23:

score: 0
Accepted
time: 0ms
memory: 3932kb

input:

14
-20 -60
4 -23 69 63
-48 76 37 -2
-68 -38 51 -13
71 8 54 85
88 -36 -46 -7
74 -2 36 -39
91 13 -2 -98
83 67 -76 -37
-18 -83 -32 78
52 42 -34 -90
64 76 -50 34
-49 23 32 0
48 -66 50 64
86 35 42 -73

output:

2194.269670292160754

result:

ok - 1 values

Test #24:

score: 0
Accepted
time: 3ms
memory: 4640kb

input:

203
100 -588
460 -5 -32 -817
342 -563 -590 -106
146 80 -738 -739
682 928 -627 -352
-924 776 357 28
280 305 -977 -955
-57 478 74 261
-520 200 -99 -77
-791 650 373 -427
178 454 -301 268
846 644 -15 -656
750 744 26 -106
-94 -561 876 -696
800 52 -598 -553
961 -65 -105 573
946 -562 -442 -469
-355 -380 -4...

output:

236913.590660144138383

result:

ok - 1 values

Test #25:

score: 0
Accepted
time: 7ms
memory: 4700kb

input:

300
-60 -206
-623 -211 980 -848
415 -547 -484 -693
-476 -831 -429 -635
-459 913 -559 -832
428 -996 -499 -146
-679 806 -85 -523
-633 -351 716 -68
-273 -559 130 -19
467 245 -599 -343
510 885 -876 537
154 774 -351 976
-172 465 942 -131
244 -568 -717 500
-805 720 -876 -133
-468 194 211 233
-960 -772 822...

output:

340476.888940476521384

result:

ok - 1 values

Test #26:

score: 0
Accepted
time: 3ms
memory: 4588kb

input:

289
-832 -527
880 285 -177 400
967 121 -103 776
68 481 482 -296
-545 851 445 -68
368 528 335 -34
-786 -495 891 773
158 20 654 404
543 626 736 -875
784 -390 -451 -687
422 -420 891 -444
-331 -915 581 880
-227 606 -112 216
290 -506 -43 -6
-455 813 -767 100
-421 -938 391 -277
-995 566 632 -182
-507 -56 ...

output:

336419.979440668481402

result:

ok - 1 values

Test #27:

score: 0
Accepted
time: 6ms
memory: 4604kb

input:

278
238 -157
382 798 24 658
134 594 -153 903
-84 908 596 686
-915 217 647 867
74 726 944 -811
611 -217 -979 -42
-314 -11 -707 -645
158 588 -399 589
146 -95 -171 711
-529 764 -384 -698
-879 -689 -140 -45
471 702 -120 51
-333 -281 -242 -59
-642 841 870 364
218 -48 -725 814
-974 892 -169 -793
-255 318 ...

output:

337492.840079513727687

result:

ok - 1 values

Test #28:

score: 0
Accepted
time: 6ms
memory: 4484kb

input:

267
-259 -353
-116 -707 868 -95
279 53 972 -681
527 -785 26 -197
656 366 398 -375
912 173 348 -331
558 148 -298 -762
-144 193 942 -447
238 756 -85 -550
-548 -22 584 -182
-6 144 -525 -728
719 -433 -226 -237
-259 -340 -259 -968
-101 32 260 -442
-418 -363 -186 -767
171 -696 570 -383
34 -688 667 701
877...

output:

324209.271218437876087

result:

ok - 1 values

Test #29:

score: 0
Accepted
time: 5ms
memory: 4960kb

input:

256
945 -901
-640 -202 -868 142
-946 -167 417 946
-956 -61 573 150
-128 831 -364 -470
-368 700 -265 249
-983 564 -121 -271
-506 324 170 -877
-272 199 -164 -385
570 54 64 115
473 -441 -727 774
-15 -180 87 -947
242 -252 -938 704
-973 886 107 -835
-983 132 -849 -820
250 215 -551 231
-837 -105 -766 867
...

output:

306435.996707936166786

result:

ok - 1 values

Test #30:

score: 0
Accepted
time: 6ms
memory: 4948kb

input:

245
324 -503
863 294 -24 -611
123 -926 530 641
617 209 -36 114
527 -195 -570 -254
-693 -614 -126 629
-695 709 128 -49
865 31 328 -69
-17 -628 755 -269
592 245 -498 200
-2 540 824 -376
-194 882 128 -778
564 729 52 335
84 282 -980 584
-670 609 719 -236
671 -628 -13 822
-993 -197 -72 516
-229 -15 630 7...

output:

298006.016568596067373

result:

ok - 1 values

Test #31:

score: 0
Accepted
time: 4ms
memory: 4728kb

input:

234
-529 -103
365 807 177 -353
614 -301 -887 266
-600 988 734 -867
-694 -24 731 -570
-84 363 281 148
565 911 94 265
-452 536 9 481
522 -216 -181 544
162 281 138 -966
424 862 847 448
137 -46 254 561
469 69 -781 -817
803 275 -181 18
454 -386 -137 871
-803 395 159 744
-777 -231 -106 691
-707 75 455 -97...

output:

272144.536268214753363

result:

ok - 1 values

Test #32:

score: 0
Accepted
time: 4ms
memory: 4648kb

input:

223
-695 -21
-133 -698 -980 895
-747 -798 152 278
-364 -922 -583 951
537 -763 -66 442
-504 647 -642 -105
-649 53 38 -449
663 -96 -313 162
-716 -737 453 120
495 -9 93 -283
77 -858 575 -407
876 471 -177 -755
-663 94 -752 893
525 816 -855 635
243 220 385 -841
-679 912 -187 214
-818 500 418 277
605 25 7...

output:

269285.366814247565344

result:

ok - 1 values

Test #33:

score: 0
Accepted
time: 4ms
memory: 4900kb

input:

227
325 -365
-605 -178 386 -813
981 860 -130 -549
-387 -948 545 -515
-444 243 843 2
384 -76 -960 331
837 365 -601 -595
998 -39 -421 -191
-876 71 160 -474
637 276 -362 888
173 5 396 362
679 530 -956 892
18 -254 -239 700
-497 761 -154 486
572 -695 446 -490
50 -679 760 -921
420 464 591 24
408 -546 -190...

output:

268760.806250015448313

result:

ok - 1 values

Test #34:

score: 0
Accepted
time: 2ms
memory: 4708kb

input:

218
484 416
898 320 -677 435
484 241 -214 980
-463 -671 635 798
47 780 -466 -851
-9 134 -969 -598
-316 784 889 -324
334 113 -127 463
-624 -614 114 -635
-64 -616 -962 826
-792 -141 -506 157
-232 719 486 -193
11 -589 -262 -893
307 906 -676 417
446 -127 185 -22
-220 -690 985 655
-831 -762 104 553
-358 ...

output:

246782.956572395807598

result:

ok - 1 values

Test #35:

score: 0
Accepted
time: 3ms
memory: 4756kb

input:

205
4 293
400 831 -570 693
-19 937 602 -774
704 -415 -566 513
64 -159 709 284
880 5 -545 511
-548 696 -601 -541
-33 -757 735 406
-716 -494 623 666
-392 -521 757 -139
-238 -369 -845 -355
-627 165 725 -776
-89 -269 765 -510
678 -411 -842 -449
137 -986 -553 801
-349 923 -990 -346
347 668 -609 -107
-552...

output:

244964.907886284956476

result:

ok - 1 values

Test #36:

score: 0
Accepted
time: 2ms
memory: 4460kb

input:

196
466 573
-98 -672 368 -60
342 -794 -759 846
-973 546 528 -449
-78 542 240 -910
-704 167 -101 105
-676 887 139 -356
-539 264 -425 -374
-11 -172 353 146
326 442 -983 -477
-818 -692 957 461
-656 672 -640 -659
-815 -641 -231 -308
-812 -316 645 -623
207 16 107 131
-575 -87 -403 718
215 -633 632 -335
5...

output:

246062.933679006935563

result:

ok - 1 values

Test #37:

score: 0
Accepted
time: 3ms
memory: 4388kb

input:

183
-530 472
-622 -169 539 177
477 725 -727 -574
233 980 695 -436
-870 990 -6 -89
-930 -684 354 850
-321 478 478 -807
329 -45 -967 308
-888 375 -242 -893
-919 361 -102 -183
877 766 -154 792
347 -364 -467 129
-400 959 80 -189
261 934 696 415
495 -475 -733 862
-962 -962 -742 699
-356 -852 -641 -226
13...

output:

232140.699975179886678

result:

ok - 1 values

Test #38:

score: 0
Accepted
time: 2ms
memory: 4328kb

input:

174
-549 459
881 329 -524 -576
-790 228 -88 -546
23 50 -241 -508
-778 975 785 -116
-873 -765 362 -248
256 -743 -631 598
-920 996 698 617
970 -332 -913 143
-880 272 980 476
-788 -829 934 942
663 -18 -56 -711
-688 479 961 -292
-183 192 -102 837
-620 -74 -800 804
188 906 -204 635
-456 -261 -824 750
-72...

output:

215858.295357792667346

result:

ok - 1 values

Test #39:

score: 0
Accepted
time: 1ms
memory: 4204kb

input:

161
-974 974
383 840 -417 -318
-784 549 35 -585
743 539 -881 636
-251 -102 -548 -263
-134 826 -684 434
-816 683 808 -505
739 -475 -627 -278
-606 514 524 -258
203 327 773 963
606 -513 -152 194
-865 -52 600 -815
880 -420 -207 434
-358 558 397 348
860 632 -803 -802
-544 -272 9 896
846 -874 -940 -524
-9...

output:

205762.824833784194198

result:

ok - 1 values

Test #40:

score: 0
Accepted
time: 1ms
memory: 4216kb

input:

152
-632 88
-115 -663 521 930
818 -810 -785 561
-520 -495 336 -845
195 434 699 -633
-205 -872 675 419
288 247 153 617
-998 -838 -215 942
-799 -579 -532 288
-989 -778 -549 520
720 606 267 -593
-59 -92 -918 188
740 -970 -555 165
-39 794 99 -364
-352 -143 54 573
-351 -877 180 -50
961 770 -994 902
-447 ...

output:

179998.814824839151697

result:

ok - 1 values

Test #41:

score: 0
Accepted
time: 2ms
memory: 4532kb

input:

273
-211 187
-587 -173 624 -882
879 573 -802 -815
237 392 729 -955
466 704 611 -478
-317 -53 301 300
579 -201 -217 326
795 930 -199 313
-70 -316 637 570
462 45 -860 -550
-876 157 455 594
-99 438 96 13
632 -768 -480 553
-216 699 745 246
-842 -36 23 545
-878 -628 477 432
-629 -352 -606 -906
-640 -123 ...

output:

316054.299608264293056

result:

ok - 1 values

Test #42:

score: 0
Accepted
time: 6ms
memory: 4384kb

input:

262
730 -100
916 323 -533 366
802 992 -606 -774
-157 3 260 929
-7 540 932 585
-241 -75 168 463
372 621 -406 -31
-161 136 354 -152
797 814 780 -408
-183 -879 822 601
204 97 -39 842
-819 -668 61 550
751 -209 972 -171
769 -240 -189 263
-987 -797 351 619
-320 -903 785 446
-743 555 454 309
-233 -471 -32 ...

output:

323978.893113193276804

result:

ok - 1 values

Test #43:

score: 0
Accepted
time: 4ms
memory: 4908kb

input:

255
-390 -404
418 832 -144 624
-92 993 152 -604
695 916 -159 90
920 856 -457 131
-327 754 -56 642
298 -572 877 946
797 -205 467 279
411 675 -388 502
404 53 810 -391
150 -325 724 504
394 -71 -391 792
-782 -869 564 550
221 635 -851 -72
555 -290 987 255
640 385 -909 847
-975 -731 729 -529
920 -915 -292...

output:

304755.733192246058024

result:

ok - 1 values

Test #44:

score: 0
Accepted
time: 8ms
memory: 4720kb

input:

300
-570 201
-32 -1000 -817 1000
-373 -1000 232 1000
1000 431 -1000 -603
885 -1000 914 1000
-400 -1000 194 1000
-1000 -64 1000 -322
-340 1000 -335 -1000
-54 -1000 -979 1000
1000 -641 -1000 -890
1000 -106 -1000 -590
-1000 -738 1000 -739
-627 -1000 -352 1000
1000 28 -1000 357
-1000 446 1000 -770
1000 ...

output:

698625.211256064125337

result:

ok - 1 values

Test #45:

score: 0
Accepted
time: 9ms
memory: 4776kb

input:

300
-760 -600
1000 -848 -1000 980
823 1000 118 -1000
-1000 896 1000 -375
-693 1000 -484 -1000
158 -1000 -303 1000
1000 729 -1000 -798
-1000 -432 1000 261
516 1000 612 -1000
-1000 -429 1000 -635
-832 1000 -559 -1000
1000 -114 -1000 999
-146 1000 -499 -1000
-523 1000 -85 -1000
1000 -68 -1000 716
-1000...

output:

707149.101676568272524

result:

ok - 1 values

Test #46:

score: 0
Accepted
time: 8ms
memory: 4856kb

input:

300
632 450
-177 -1000 400 1000
-1000 622 1000 -408
-1000 -162 1000 -361
-103 -1000 776 1000
482 -1000 -296 1000
-265 -1000 -328 1000
-1000 541 1000 -509
-1000 445 1000 -68
-775 1000 -425 -1000
-34 1000 335 -1000
891 -1000 773 1000
1000 404 -1000 654
-875 1000 736 -1000
-1000 -451 1000 -687
-444 100...

output:

705851.596996172214858

result:

ok - 1 values

Test #47:

score: 0
Accepted
time: 7ms
memory: 4752kb

input:

300
-296 500
1000 658 -1000 24
550 1000 468 -1000
-1000 -917 1000 -211
302 1000 -932 -1000
-598 -1000 746 1000
1000 -662 -1000 -693
-1000 729 1000 -69
1000 584 -1000 -75
-549 1000 933 -1000
-1000 -509 1000 465
1000 -438 -1000 -687
-1000 -790 1000 457
-1000 -641 1000 923
339 1000 -642 -1000
-443 -100...

output:

704583.876068878220394

result:

ok - 1 values

Test #48:

score: 0
Accepted
time: 2ms
memory: 4776kb

input:

300
-540 -500
868 -1000 -95 1000
-1000 972 1000 -681
-1000 26 1000 -197
-726 -1000 -59 1000
398 -1000 -375 1000
28 -1000 -881 1000
-1000 291 1000 -197
-683 -1000 799 1000
-1000 599 1000 821
-1000 348 1000 -331
-298 -1000 -762 1000
-569 -1000 -453 1000
-1000 -875 1000 -197
-464 -1000 879 1000
1000 -4...

output:

679707.653480242472142

result:

ok - 1 values

Test #49:

score: 0
Accepted
time: 6ms
memory: 4860kb

input:

300
-471 1000
1000 142 -1000 -868
-129 1000 -486 -1000
-1000 926 1000 102
-1000 -793 1000 121
1000 157 -1000 428
655 1000 351 -1000
-1000 -720 1000 -813
813 -1000 472 1000
1000 -820 -1000 -573
-1000 -864 1000 -669
1000 -532 -1000 -589
1000 444 -1000 208
-1000 -582 1000 -236
-1000 518 1000 39
130 -10...

output:

682767.438608425785787

result:

ok - 1 values

Test #50:

score: 0
Accepted
time: 4ms
memory: 4876kb

input:

300
-875 271
-24 -1000 -611 1000
-1000 530 1000 641
-1000 -36 1000 114
1000 419 -1000 -855
1000 -254 -1000 -570
-1000 -701 1000 577
-1000 -126 1000 629
1000 -49 -1000 128
328 -1000 -69 1000
-1000 755 1000 -269
-498 -1000 200 1000
840 1000 596 -1000
-1000 824 1000 -376
1000 -778 -1000 128
1000 -774 -...

output:

677682.953569319099188

result:

ok - 1 values

Test #51:

score: 0
Accepted
time: 6ms
memory: 4788kb

input:

300
800 -835
1000 -353 -1000 177
-402 1000 -136 -1000
-1000 -887 1000 266
-1000 734 1000 -867
1000 -570 -1000 731
148 1000 281 -1000
-1000 94 1000 265
-1000 9 1000 481
-181 -1000 544 1000
-966 1000 138 -1000
1000 448 -1000 847
254 -1000 561 1000
-817 1000 -781 -1000
-181 -1000 18 1000
-1000 -137 100...

output:

685011.163255887106061

result:

ok - 1 values

Test #52:

score: 0
Accepted
time: 5ms
memory: 4752kb

input:

300
1000 -84
-980 -1000 895 1000
-1000 880 1000 368
-1000 152 1000 278
1000 -398 -1000 497
1000 -108 -1000 431
-1000 -583 1000 951
-1000 -66 1000 442
759 1000 167 -1000
1000 -105 -1000 -642
-973 1000 908 -1000
38 -1000 -449 1000
-1000 -313 1000 162
120 1000 453 -1000
82 1000 -583 -1000
-124 1000 292...

output:

718443.663055724697188

result:

ok - 1 values

Test #53:

score: 0
Accepted
time: 7ms
memory: 4804kb

input:

300
0 839
-1000 386 1000 -813
-688 -1000 640 1000
1000 950 -1000 -757
252 -1000 805 1000
-130 -1000 -549 1000
-1000 545 1000 -515
-1000 702 1000 -563
843 -1000 2 1000
1000 331 -1000 -960
-595 1000 -601 -1000
-191 1000 -421 -1000
160 -1000 -474 1000
1000 888 -1000 -362
1000 362 -1000 396
-956 -1000 8...

output:

691357.013964911689982

result:

ok - 1 values

Test #54:

score: 0
Accepted
time: 0ms
memory: 4056kb

input:

1
0 0
0 0 0 1

output:

2.000000000000000

result:

ok - 1 values

Test #55:

score: 0
Accepted
time: 0ms
memory: 4072kb

input:

1
0 1
0 0 0 1

output:

2.000000000000000

result:

ok - 1 values