QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#193497#7521. Find the Gapucup-team112#WA 106ms3988kbC++1716.2kb2023-09-30 17:16:452023-09-30 17:16:45

Judging History

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

  • [2023-09-30 17:16:45]
  • 评测
  • 测评结果:WA
  • 用时:106ms
  • 内存:3988kb
  • [2023-09-30 17:16:45]
  • 提交

answer

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;

namespace templates {
// type
using ll  = long long;
using ull = unsigned long long;
template <class T>
using pq = priority_queue<T>;
template <class T>
using qp = priority_queue<T, vector<T>, greater<T>>;
#define vec(T, A, ...) vector<T> A(__VA_ARGS__);
#define vvec(T, A, h, ...) vector<vector<T>> A(h, vector<T>(__VA_ARGS__));
#define vvvec(T, A, h1, h2, ...) vector<vector<vector<T>>> A(h1, vector<vector<T>>(h2, vector<T>(__VA_ARGS__)));

// for loop
#define fori1(a) for (ll _ = 0; _ < (a); _++)
#define fori2(i, a) for (ll i = 0; i < (a); i++)
#define fori3(i, a, b) for (ll i = (a); i < (b); i++)
#define fori4(i, a, b, c) for (ll i = (a); ((c) > 0 || i > (b)) && ((c) < 0 || i < (b)); i += (c))
#define overload4(a, b, c, d, e, ...) e
#define fori(...) overload4(__VA_ARGS__, fori4, fori3, fori2, fori1)(__VA_ARGS__)

// declare and input
// clang-format off
#define INT(...) int __VA_ARGS__; inp(__VA_ARGS__);
#define LL(...) ll __VA_ARGS__; inp(__VA_ARGS__);
#define STRING(...) string __VA_ARGS__; inp(__VA_ARGS__);
#define CHAR(...) char __VA_ARGS__; inp(__VA_ARGS__);
#define DOUBLE(...) double __VA_ARGS__; STRING(str___); __VA_ARGS__ = stod(str___);
#define VEC(T, A, n) vector<T> A(n); inp(A);
#define VVEC(T, A, n, m) vector<vector<T>> A(n, vector<T>(m)); inp(A);
// clang-format on

// const value
const ll MOD1   = 1000000007;
const ll MOD9   = 998244353;
const double PI = acos(-1);

// other macro
#ifndef RIN__LOCAL
#define endl "\n"
#endif
#define spa ' '
#define len(A) ll(A.size())
#define all(A) begin(A), end(A)

// function
vector<char> stoc(string &S) {
    int n = S.size();
    vector<char> ret(n);
    for (int i = 0; i < n; i++) ret[i] = S[i];
    return ret;
}
string ctos(vector<char> &S) {
    int n      = S.size();
    string ret = "";
    for (int i = 0; i < n; i++) ret += S[i];
    return ret;
}

template <class T>
auto min(const T &a) {
    return *min_element(all(a));
}
template <class T>
auto max(const T &a) {
    return *max_element(all(a));
}
template <class T, class S>
auto clamp(T &a, const S &l, const S &r) {
    return (a > r ? r : a < l ? l : a);
}
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);
}
template <class T, class S>
inline bool chclamp(T &a, const S &l, const S &r) {
    auto b = clamp(a, l, r);
    return (a != b ? a = b, 1 : 0);
}

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

template <typename T>
vector<T> compression(vector<T> X) {
    sort(all(X));
    X.erase(unique(all(X)), X.end());
    return X;
}

// input and output
namespace io {

// vector<T>
template <typename T>
istream &operator>>(istream &is, vector<T> &A) {
    for (auto &a : A) is >> a;
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        os << A[i];
        if (i != A.size() - 1) os << ' ';
    }
    return os;
}

// vector<vector<T>>
template <typename T>
istream &operator>>(istream &is, vector<vector<T>> &A) {
    for (auto &a : A) is >> a;
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<vector<T>> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        os << A[i];
        if (i != A.size() - 1) os << endl;
    }
    return os;
}

// pair<S, T>
template <typename S, typename T>
istream &operator>>(istream &is, pair<S, T> &A) {
    is >> A.first >> A.second;
    return is;
}
template <typename S, typename T>
ostream &operator<<(ostream &os, pair<S, T> &A) {
    os << A.first << ' ' << A.second;
    return os;
}

// vector<pair<S, T>>
template <typename S, typename T>
ostream &operator<<(ostream &os, vector<pair<S, T>> &A) {
    for (size_t i = 0; i < A.size(); i++) {
        os << A[i];
        if (i != A.size() - 1) os << endl;
    }
    return os;
}

// set<T>
template <typename T>
ostream &operator<<(ostream &os, set<T> &A) {
    for (auto itr = A.begin(); itr != A.end(); itr++) {
        os << *itr;
        if (next(itr) != A.end()) os << ' ';
    }
    return os;
}

// unordered_set<T>
template <typename T>
ostream &operator<<(ostream &os, unordered_set<T> &A) {
    for (auto itr = A.begin(); itr != A.end(); itr++) {
        os << *itr;
        if (next(itr) != A.end()) os << ' ';
    }
    return os;
}

// multiset<T>
template <typename T>
ostream &operator<<(ostream &os, multiset<T> &A) {
    for (auto itr = A.begin(); itr != A.end(); itr++) {
        os << *itr;
        if (next(itr) != A.end()) os << ' ';
    }
    return os;
}

// unordered_multiset<T>
template <typename T>
ostream &operator<<(ostream &os, unordered_multiset<T> &A) {
    for (auto itr = A.begin(); itr != A.end(); itr++) {
        os << *itr;
        if (next(itr) != A.end()) os << endl;
    }
    return os;
}

// map<S, T>
template <typename S, typename T>
ostream &operator<<(ostream &os, map<S, T> &A) {
    for (auto itr = A.begin(); itr != A.end(); itr++) {
        os << *itr;
        if (next(itr) != A.end()) os << endl;
    }
    return os;
}

// unordered_map<S, T>
template <typename S, typename T>
ostream &operator<<(ostream &os, unordered_map<S, T> &A) {
    for (auto itr = A.begin(); itr != A.end(); itr++) {
        os << *itr;
        if (next(itr) != A.end()) os << endl;
    }
    return os;
}

// tuple
template <typename T, size_t N>
struct TuplePrint {
    static ostream &print(ostream &os, const T &t) {
        TuplePrint<T, N - 1>::print(os, t);
        os << ' ' << get<N - 1>(t);
        return os;
    }
};
template <typename T>
struct TuplePrint<T, 1> {
    static ostream &print(ostream &os, const T &t) {
        os << get<0>(t);
        return os;
    }
};
template <typename... Args>
ostream &operator<<(ostream &os, const tuple<Args...> &t) {
    TuplePrint<decltype(t), sizeof...(Args)>::print(os, t);
    return os;
}

// queue<T>
template <typename T>
ostream &operator<<(ostream &os, queue<T> &A) {
    auto B = A;
    while (!B.empty()) {
        os << B.front();
        B.pop();
        if (!B.empty()) os << ' ';
    }
    return os;
}

// deque<T>
template <typename T>
ostream &operator<<(ostream &os, deque<T> &A) {
    auto B = A;
    while (!B.empty()) {
        os << B.front();
        B.pop_front();
        if (!B.empty()) os << ' ';
    }
    return os;
}

// stack<T>
template <typename T>
ostream &operator<<(ostream &os, stack<T> &A) {
    auto B = A;
    stack<T> C;
    while (!B.empty()) {
        C.push(B.top());
        B.pop();
    }
    while (!C.empty()) {
        os << C.top();
        C.pop();
        if (!C.empty()) os << ' ';
    }
    return os;
}

// priority_queue<T>
template <typename T>
ostream &operator<<(ostream &os, priority_queue<T> &A) {
    auto B = A;
    while (!B.empty()) {
        os << B.top();
        B.pop();
        if (!B.empty()) os << endl;
    }
    return os;
}

// bitset<N>
template <size_t N>
ostream &operator<<(ostream &os, bitset<N> &A) {
    for (size_t i = 0; i < N; i++) {
        os << A[i];
    }
    return os;
}

// io functions
void FLUSH() {
    cout << flush;
}

void print() {
    cout << endl;
}
template <class Head, class... Tail>
void print(Head &&head, Tail &&...tail) {
    cout << head;
    if (sizeof...(Tail)) cout << spa;
    print(forward<Tail>(tail)...);
}

template <typename T, typename S>
void prisep(vector<T> &A, S sep) {
    int n = A.size();
    for (int i = 0; i < n; i++) {
        cout << A[i];
        if (i != n - 1) cout << sep;
    }
    cout << endl;
}
template <typename T, typename S>
void priend(T A, S end) {
    cout << A << end;
}
template <typename T>
void prispa(T A) {
    priend(A, spa);
}
template <typename T, typename S>
bool printif(bool f, T A, S B) {
    if (f)
        print(A);
    else
        print(B);
    return f;
}

template <class... T>
void inp(T &...a) {
    (cin >> ... >> a);
}

} // namespace io
using namespace io;

// read graph
vector<vector<int>> read_edges(int n, int m, bool direct = false, int indexed = 1) {
    vector<vector<int>> edges(n, vector<int>());
    for (int i = 0; i < m; i++) {
        INT(u, v);
        u -= indexed;
        v -= indexed;
        edges[u].push_back(v);
        if (!direct) edges[v].push_back(u);
    }
    return edges;
}
vector<vector<int>> read_tree(int n, int indexed = 1) {
    return read_edges(n, n - 1, false, indexed);
}

template <typename T = long long>
vector<vector<pair<int, T>>> read_wedges(int n, int m, bool direct = false, int indexed = 1) {
    vector<vector<pair<int, T>>> edges(n, vector<pair<int, T>>());
    for (int i = 0; i < m; i++) {
        INT(u, v);
        T w;
        inp(w);
        u -= indexed;
        v -= indexed;
        edges[u].push_back({v, w});
        if (!direct) edges[v].push_back({u, w});
    }
    return edges;
}
template <typename T = long long>
vector<vector<pair<int, T>>> read_wtree(int n, int indexed = 1) {
    return read_wedges<T>(n, n - 1, false, indexed);
}

// yes / no
namespace yesno {

// yes
inline bool yes(bool f = true) {
    cout << (f ? "yes" : "no") << endl;
    return f;
}
inline bool Yes(bool f = true) {
    cout << (f ? "Yes" : "No") << endl;
    return f;
}
inline bool YES(bool f = true) {
    cout << (f ? "YES" : "NO") << endl;
    return f;
}

// no
inline bool no(bool f = true) {
    cout << (!f ? "yes" : "no") << endl;
    return f;
}
inline bool No(bool f = true) {
    cout << (!f ? "Yes" : "No") << endl;
    return f;
}
inline bool NO(bool f = true) {
    cout << (!f ? "YES" : "NO") << endl;
    return f;
}

// possible
inline bool possible(bool f = true) {
    cout << (f ? "possible" : "impossible") << endl;
    return f;
}
inline bool Possible(bool f = true) {
    cout << (f ? "Possible" : "Impossible") << endl;
    return f;
}
inline bool POSSIBLE(bool f = true) {
    cout << (f ? "POSSIBLE" : "IMPOSSIBLE") << endl;
    return f;
}

// impossible
inline bool impossible(bool f = true) {
    cout << (!f ? "possible" : "impossible") << endl;
    return f;
}
inline bool Impossible(bool f = true) {
    cout << (!f ? "Possible" : "Impossible") << endl;
    return f;
}
inline bool IMPOSSIBLE(bool f = true) {
    cout << (!f ? "POSSIBLE" : "IMPOSSIBLE") << endl;
    return f;
}

// Alice Bob
inline bool Alice(bool f = true) {
    cout << (f ? "Alice" : "Bob") << endl;
    return f;
}
inline bool Bob(bool f = true) {
    cout << (f ? "Bob" : "Alice") << endl;
    return f;
}

// Takahashi Aoki
inline bool Takahashi(bool f = true) {
    cout << (f ? "Takahashi" : "Aoki") << endl;
    return f;
}
inline bool Aoki(bool f = true) {
    cout << (f ? "Aoki" : "Takahashi") << endl;
    return f;
}

} // namespace yesno
using namespace yesno;

} // namespace templates
using namespace templates;

//// https://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=4449247
#define INF 1000000000
const double EPS = 1e-8;

struct point3d {
    double x, y, z;
    point3d() : x(0), y(0), z(0) {}
    point3d(const point3d &p) : x(p.x), y(p.y), z(p.z) {}
    point3d(double x_, double y_, double z_) : x(x_), y(y_), z(z_) {}

    point3d &operator+=(point3d a) {
        x += a.x;
        y += a.y;
        z += a.z;
        return *this;
    }
    point3d &operator-=(point3d a) {
        x -= a.x;
        y -= a.y;
        z -= a.z;
        return *this;
    }
    point3d &operator*=(double a) {
        x *= a;
        y *= a;
        z *= a;
        return *this;
    }
    point3d &operator/=(double a) {
        x /= a;
        y /= a;
        z /= a;
        return *this;
    }
    point3d operator+(point3d a) const {
        return point3d(x, y, z) += a;
    }
    point3d operator-(point3d a) const {
        return point3d(x, y, z) -= a;
    }
    point3d operator*(double a) const {
        return point3d(x, y, z) *= a;
    }
    point3d operator/(double a) const {
        return point3d(x, y, z) /= a;
    }
    bool operator<(point3d a) const {
        return (x != a.x ? x < a.x : (y != a.y ? y < a.y : z < a.z));
    }
    bool operator==(point3d a) const {
        return (abs(x - a.x) < EPS && abs(y - a.y) < EPS && abs(z - a.z) < EPS);
    }
    bool operator!=(point3d a) const {
        return !(*this == a);
    }
};

struct segment3d : public array<point3d, 2> {
    segment3d(const point3d &a, const point3d &b) {
        at(0) = a;
        at(1) = b;
    }
};

double abs(point3d p) {
    return sqrt(p.x * p.x + p.y * p.y + p.z * p.z);
}

double dot(point3d a, point3d b) {
    return a.x * b.x + a.y * b.y + a.z * b.z;
}

point3d cross(point3d a, point3d b) {
    return point3d(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);
}

double angle(point3d a, point3d b) {
    return acos(dot(a, b) / (abs(a) * abs(b)));
}

struct plane {
    double a, b, c, d;
    plane() : a(0), b(0), c(0), d(0) {}
    plane(double a_, double b_, double c_, double d_) : a(a_), b(b_), c(c_), d(d_) {}
    plane(point3d p1, point3d p2, point3d p3) {
        point3d A = p2 - p1;
        point3d B = p3 - p1;
        point3d p = cross(A, B);
        a         = p.x;
        b         = p.y;
        c         = p.z;
        d         = -(a * p1.x + b * p1.y + c * p1.z);
    }
    double assignment(point3d p) {
        return a * p.x + b * p.y + c * p.z + d;
    }
};

double distance(point3d p, plane pl) {
    double a = (p.x * pl.a + p.y * pl.b + p.z * pl.c + pl.d);
    if (a == 0) return 0;
    double b = sqrt(pl.a * pl.a + pl.b * pl.b + pl.c * pl.c);
    return a / b;
}

double distance(plane p, point3d pl) {
    return distance(pl, p);
}

point3d projection(point3d p, plane pl) {
    double d  = distance(p, pl);
    point3d a = point3d(pl.a, pl.b, pl.c);
    a /= abs(a);
    point3d ret = p + a * d;
    if (distance(ret, pl) < EPS) return ret;
    return p - a * d;
}

point3d crossPoint3d(segment3d s, plane p) {
    double bunsi = p.a * s[0].x + p.b * s[0].y + p.c * s[0].z + p.d;
    double bunbo = p.a * (s[0].x - s[1].x) + p.b * (s[0].y - s[1].y) + p.c * (s[0].z - s[1].z);
    if (abs(bunbo) < EPS) return point3d(INF, INF, INF);
    double t = bunsi / bunbo;
    return s[0] + (s[1] - s[0]) * t;
}

namespace std {
istream &operator>>(std::istream &is, point3d &p) {
    is >> p.x >> p.y >> p.z;
    return is;
}

ostream &operator<<(ostream &os, const point3d &p) {
    os << p.x << " " << p.y << " " << p.z;
    return os;
}

ostream &operator<<(ostream &os, const plane &p) {
    os << p.a << "x + " << p.b << "y + " << p.c << "z + " << p.d;
    return os;
}
} // namespace std

using ld = long double;
void solve() {
    INT(n);
    VEC(point3d, P, n);
    if (n <= 3) {
        print(0);
        return;
    }

    ld ans = 1e30;
    fori(i, n) fori(j, i + 1, n) fori(k, j + 1, n) {
        plane pl(P[i], P[j], P[k]);

        ld mi = 1e30;
        ld ma = -1e30;
        fori(t, n) {
            ld d = distance(P[t], pl);
            chmin(mi, d);
            chmax(ma, d);
        }
        chmin(ans, ma - mi);
    }

    fori(i, n) fori(j, i + 1, n) {
        fori(k, i, n) fori(l, k + 1, n) {
            if (i == k or i == l or j == k or j == l) continue;
            point3d a = P[i];
            point3d b = P[j];
            point3d c = P[l] + P[i] - P[k];
            if (b == c) continue;
            plane pl(a, b, c);

            ld mi = 1e30;
            ld ma = -1e30;
            fori(t, n) {
                ld d = distance(P[t], pl);
                chmin(mi, d);
                chmax(ma, d);
            }

            chmin(ans, ma - mi);
        }
    }

    print(ans);
}

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cout << fixed << setprecision(12);
    int t;
    t = 1;
    // cin >> t;
    while (t--) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3840kb

input:

8
1 1 1
1 1 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
2 2 2

output:

1.000000000000

result:

ok found '1.000000000', expected '1.000000000', error '0.000000000'

Test #2:

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

input:

5
1 1 1
1 2 1
1 1 2
1 2 2
2 1 1

output:

0.707106781187

result:

ok found '0.707106781', expected '0.707106781', error '0.000000000'

Test #3:

score: 0
Accepted
time: 83ms
memory: 3864kb

input:

50
973 1799 4431
1036 1888 4509
1099 1977 4587
1162 2066 4665
1225 2155 4743
1288 2244 4821
1351 2333 4899
1414 2422 4977
1540 2600 5133
1603 2689 5211
1666 2778 5289
1729 2867 5367
1792 2956 5445
1855 3045 5523
1918 3134 5601
1981 3223 5679
2044 3312 5757
2107 3401 5835
2170 3490 5913
2296 3668 606...

output:

0.000000000000

result:

ok found '0.000000000', expected '0.000000000', error '-0.000000000'

Test #4:

score: 0
Accepted
time: 83ms
memory: 3892kb

input:

50
4532 3245 1339
4624 3260 1345
4716 3275 1351
4808 3290 1357
4900 3305 1363
5084 3335 1375
5176 3350 1381
5268 3365 1387
5360 3380 1393
5452 3395 1399
5544 3410 1405
5728 3440 1417
5820 3455 1423
5912 3470 1429
6096 3500 1441
6188 3515 1447
6280 3530 1453
6372 3545 1459
6464 3560 1465
6556 3575 14...

output:

0.000000000000

result:

ok found '0.000000000', expected '0.000000000', error '-0.000000000'

Test #5:

score: 0
Accepted
time: 85ms
memory: 3888kb

input:

50
1 70 7443
1 138 5063
2 109 5971
3 23 8874
3 152 4359
4 59 7507
5 50 7715
5 73 6910
7 25 8376
7 103 5646
8 3 9039
9 83 6132
9 142 4067
10 124 4590
11 140 3923
12 168 2836
13 46 6999
13 84 5669
13 189 1994
13 229 594
15 171 2410
16 94 4998
20 38 6530
20 125 3485
21 78 5023
22 210 296
23 117 3444
25...

output:

0.000000000000

result:

ok found '0.000000000', expected '0.000000000', error '-0.000000000'

Test #6:

score: 0
Accepted
time: 85ms
memory: 3904kb

input:

50
1 95 5991
3 22 9019
25 103 5199
25 141 3603
38 103 4952
39 139 3421
59 6 8627
60 48 6844
66 33 7360
107 88 4271
109 188 33
112 177 438
114 107 3340
122 77 4448
123 169 565
127 1 7545
142 161 540
143 70 4343
146 153 800
156 129 1618
162 63 4276
162 150 622
166 93 2940
173 78 3437
180 143 574
189 1...

output:

0.000000000000

result:

ok found '0.000000000', expected '0.000000000', error '-0.000000000'

Test #7:

score: 0
Accepted
time: 106ms
memory: 3892kb

input:

50
14 3658 1218
17 32 7984
741 1906 5773
755 8668 1019
834 2386 4591
1306 3866 7044
2304 2895 120
2450 8613 7374
2595 1919 2119
2610 9866 9419
2694 2845 2941
2838 2702 7608
2883 4143 4049
3082 4800 3611
3338 6703 9039
3424 2035 1863
3471 2672 5858
4339 1330 2029
4720 6970 4719
4853 387 5866
5415 975...

output:

9341.565896183969

result:

ok found '9341.565896184', expected '9341.565896184', error '0.000000000'

Test #8:

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

input:

50
159 8547 6997
489 5655 1694
934 6033 5986
1088 9448 2840
1395 7938 709
2007 7008 9167
2429 7436 2364
2670 7425 7568
2694 7703 9701
2797 9081 2872
2813 1423 1081
3105 5669 4792
3277 4229 8596
3332 8329 1497
3476 1696 448
3738 996 508
4050 3854 1609
4105 9677 5306
4383 5848 5996
4583 3186 9948
4723...

output:

8144.165721648155

result:

ok found '8144.165721648', expected '8144.165721648', error '0.000000000'

Test #9:

score: 0
Accepted
time: 104ms
memory: 3976kb

input:

50
140 3759 310
325 657 967
337 2969 2340
341 1234 8436
953 3787 949
1137 9272 5791
1597 8518 7711
2642 3171 9590
2808 2188 9307
2932 7143 773
3075 4055 3861
3479 2654 2788
3516 1372 2617
4202 2476 6906
4446 5279 7147
4586 2815 3229
4956 839 7424
5038 5342 8758
5418 8882 6013
5533 4047 3030
5746 498...

output:

9146.897027572013

result:

ok found '9146.897027572', expected '9146.897027572', error '0.000000000'

Test #10:

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

input:

50
27 8992 3447
97 1870 5176
255 7759 6929
287 8477 8753
424 6928 3781
561 5383 3443
800 5654 5210
812 829 5236
1058 6953 2716
1129 2576 4054
1525 5088 1278
1743 7422 862
2004 2404 6472
2721 5900 258
3024 9464 4959
3027 8887 4260
3344 6066 5823
3715 5789 9796
3814 5999 277
3915 9604 12
4072 663 3333...

output:

9143.915107107794

result:

ok found '9143.915107108', expected '9143.915107108', error '0.000000000'

Test #11:

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

input:

50
514 6841 888
673 9023 8705
686 4780 9173
742 2761 5439
894 585 5417
894 1436 3585
1433 6876 9685
1728 8358 463
1736 4442 7163
1758 4362 4567
2175 4091 8630
2631 4226 6098
2648 9912 4504
2752 7427 8318
2806 3482 839
3158 6527 3601
3682 4472 5007
3764 3518 942
4096 1948 2138
4116 9501 5003
4122 318...

output:

9169.736297298838

result:

ok found '9169.736297299', expected '9169.736297299', error '0.000000000'

Test #12:

score: 0
Accepted
time: 105ms
memory: 3880kb

input:

50
169 7924 553
239 9844 8248
244 7970 4414
476 6722 3954
732 477 1641
966 6652 3944
981 2690 6362
1230 3488 921
1372 3614 4691
1395 5858 4433
1452 253 94
1754 6818 6578
1768 4318 6261
1814 7730 593
2189 7047 1844
2539 4933 4531
2882 8069 831
3188 3902 6915
3217 5522 9148
3552 8575 5975
3909 9654 63...

output:

9150.135233080571

result:

ok found '9150.135233081', expected '9150.135233081', error '0.000000000'

Test #13:

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

input:

50
96 1653 9109
238 3924 6708
484 8684 2909
750 5493 3159
817 1112 3722
909 918 7323
923 3270 4679
963 4055 5335
1059 9040 4043
1083 5006 2224
1225 2043 1082
1257 6421 570
1884 3398 6379
2010 4066 3604
2270 4127 1357
2714 1776 7355
2916 2914 3705
2960 5403 5768
3613 4179 9807
3792 79 6885
3879 5691 ...

output:

8959.815904859939

result:

ok found '8959.815904860', expected '8959.815904860', error '0.000000000'

Test #14:

score: 0
Accepted
time: 105ms
memory: 3892kb

input:

50
466 4419 3421
491 2907 9714
506 1869 8685
525 7133 5224
896 6803 414
1018 5218 7102
1291 9905 269
1375 3915 9212
1541 6176 2118
1730 3165 4221
2295 589 9786
2311 9068 6251
2651 8939 9186
2867 6164 7925
3140 5988 5013
3296 7112 5300
3381 16 2989
3495 511 7235
3603 8547 7675
3623 8113 8461
3877 810...

output:

9149.769937427714

result:

ok found '9149.769937428', expected '9149.769937428', error '0.000000000'

Test #15:

score: 0
Accepted
time: 104ms
memory: 3968kb

input:

50
78 4 4902
193 9001 5084
419 4402 642
578 8090 167
584 9616 4407
1533 4560 8566
1686 179 6908
1951 2381 3902
2010 6519 3351
2083 2122 2314
2394 7870 934
2618 9113 1012
2796 3688 4096
2928 7277 9546
3051 3575 6416
3096 3711 3736
3200 6179 1933
3288 8818 9981
3534 8346 2715
3740 8112 1351
3772 6404 ...

output:

8392.805222252226

result:

ok found '8392.805222252', expected '8392.805222252', error '0.000000000'

Test #16:

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

input:

50
705 6359 9590
709 9583 837
1100 7827 378
1118 5958 5626
1190 2811 3485
1270 1818 6313
1567 9075 1709
1655 2572 4135
1766 951 2003
1870 352 7790
2509 20 2260
2733 1466 7061
2744 3417 6230
2820 4147 5340
3058 9727 4331
3429 7782 3337
3463 9788 5114
4180 5867 2244
4426 3621 3218
4762 3055 4802
4880 ...

output:

8573.352671254601

result:

ok found '8573.352671255', expected '8573.352671255', error '0.000000000'

Test #17:

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

input:

50
165 8302 5584
700 7675 6720
881 7965 4577
889 1338 8010
1116 1639 795
1186 8218 2543
1217 7776 3846
1430 9843 1018
1454 998 4454
1624 4047 4040
1624 4230 8183
1682 2296 8486
2100 7651 4049
2147 7426 4916
2524 519 5402
2743 51 6480
3284 5924 8050
3330 5196 9459
3517 4263 5230
3624 6365 595
4043 16...

output:

9058.741907740054

result:

ok found '9058.741907740', expected '9058.741907740', error '0.000000000'

Test #18:

score: 0
Accepted
time: 104ms
memory: 3916kb

input:

50
100 1845 5981
212 8119 8531
272 2837 9427
393 3708 6901
483 121 2429
545 9916 3687
636 9192 6039
1470 8344 6819
1643 6549 7092
1675 2261 8181
1847 7777 6817
2015 8137 940
2305 9959 58
2336 8793 1450
2399 6420 8272
3224 4903 4156
3225 8648 6448
3274 9687 8319
3431 9580 3305
3488 1299 9485
3622 588...

output:

8012.867917721291

result:

ok found '8012.867917721', expected '8012.867917721', error '0.000000000'

Test #19:

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

input:

50
19 2681 1646
27 1110 5179
338 6651 3754
507 2567 7601
557 2595 480
580 2720 3352
584 937 6894
591 6885 5697
607 2834 2727
667 9502 9812
789 6818 9256
1122 253 5727
1436 7824 2840
1725 3949 3495
1733 297 2443
1901 7810 3668
1962 2763 775
2279 4850 913
2461 2951 2842
2491 8181 7544
2605 6682 3557
2...

output:

9064.927387661639

result:

ok found '9064.927387662', expected '9064.927387662', error '0.000000000'

Test #20:

score: 0
Accepted
time: 102ms
memory: 3988kb

input:

50
194 7049 1546
264 8020 6837
847 8285 1854
862 5862 4012
904 9367 6797
1575 4158 8361
1835 2084 4014
1850 418 2351
2003 2813 7003
2043 6346 1467
2046 1800 8962
2530 7010 6913
2992 2316 6887
3399 1789 8276
3518 7325 8772
3545 55 1523
3686 1275 9961
4019 1016 5463
4486 7468 3485
4580 1802 8881
4782 ...

output:

8101.741789061708

result:

ok found '8101.741789062', expected '8101.741789062', error '0.000000000'

Test #21:

score: 0
Accepted
time: 104ms
memory: 3828kb

input:

50
103 6485 4333
511 6113 4211
639 8425 3693
739 7999 8239
808 5095 8775
826 1656 7709
1173 7565 7160
1320 1179 6855
1326 2043 1063
1604 267 6466
1625 6615 6094
1697 6022 77
1851 6269 1588
2138 4521 288
2648 9706 898
2990 2590 1837
3016 4963 4557
3037 3834 5432
3161 6627 3844
3448 9741 2733
3753 137...

output:

9128.598154250803

result:

ok found '9128.598154251', expected '9128.598154251', error '0.000000000'

Test #22:

score: 0
Accepted
time: 104ms
memory: 3976kb

input:

50
261 4050 3501
264 4793 7406
737 6575 4542
1143 98 723
1453 9810 529
1676 7893 2790
1936 4005 5944
1954 7716 9379
1980 9534 2502
1981 5073 3147
2117 2971 8441
2144 7774 7451
2279 6190 3900
2292 3909 6381
2723 5981 433
2784 7435 9645
2939 1908 8904
3063 3468 7719
3552 6932 890
3563 3953 5582
3899 2...

output:

9066.875957901979

result:

ok found '9066.875957902', expected '9066.875957902', error '0.000000000'

Test #23:

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

input:

50
124 8775 2089
502 2885 6276
699 9285 7955
880 6499 8738
1293 8478 4996
1294 7009 3514
1314 6660 8895
1583 49 517
2090 7900 446
2711 1216 9700
2792 1533 727
2840 1552 2842
2965 7790 8788
3491 4707 3568
3704 4977 960
3941 1201 6460
4003 4114 5115
4012 2234 9330
4073 6968 5235
4310 6469 6799
4630 59...

output:

8820.250746374550

result:

ok found '8820.250746375', expected '8820.250746375', error '0.000000000'

Test #24:

score: 0
Accepted
time: 105ms
memory: 3916kb

input:

50
317 4576 3269
526 4973 5972
1295 1304 4839
1508 3932 1994
1959 7684 48
2001 8395 8132
2232 7475 8511
2667 7154 1453
2747 5229 1254
3229 3535 1083
3346 2197 3601
3430 3753 3090
3432 5831 4752
3526 2117 2434
3868 3250 5864
3909 6614 6027
4133 4435 3421
4352 4192 3560
4559 1398 36
4671 3830 7598
476...

output:

8710.103157749863

result:

ok found '8710.103157750', expected '8710.103157750', error '0.000000000'

Test #25:

score: -100
Wrong Answer
time: 101ms
memory: 3896kb

input:

50
237 1777 4827
439 298 4986
845 3946 3189
891 4118 3219
914 4204 3234
960 4376 3264
1015 722 1293
1029 4634 3309
1069 5704 7228
1080 1878 9626
1121 4978 3369
1144 5064 3384
1213 5322 3429
1236 5408 3444
1259 5494 3459
1305 5666 3489
1328 5752 3504
1397 6010 3549
1420 6096 3564
1535 6526 3639
1581 ...

output:

0.000000000000

result:

wrong answer 1st numbers differ - expected: '8321.8866496', found: '0.0000000', error = '1.0000000'