QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#73928#5444. Tavern Chessyuto1115AC ✓859ms3720kbC++179.9kb2023-01-29 16:15:552023-01-29 16:15:56

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-29 16:15:56]
  • 评测
  • 测评结果:AC
  • 用时:859ms
  • 内存:3720kb
  • [2023-01-29 16:15:55]
  • 提交

answer

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/tag_and_trait.hpp>
#define overload4(_1, _2, _3, _4, name, ...) name
#define rep1(i, n) for (ll i = 0; i < ll(n); ++i)
#define rep2(i, s, n) for (ll i = ll(s); i < ll(n); ++i)
#define rep3(i, s, n, d) for(ll i = ll(s); i < ll(n); i+=d)
#define rep(...) overload4(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__)
#define rrep1(i, n) for (ll i = ll(n)-1; i >= 0; i--)
#define rrep2(i, n, t) for (ll i = ll(n)-1; i >= (ll)t; i--)
#define rrep3(i, n, t, d) for (ll i = ll(n)-1; i >= (ll)t; i-=d)
#define rrep(...) overload4(__VA_ARGS__,rrep3,rrep2,rrep1)(__VA_ARGS__)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SUM(a) accumulate(all(a),0LL)
#define MIN(a) *min_element(all(a))
#define MAX(a) *max_element(all(a))
#define SORT(a) sort(all(a));
#define REV(a) reverse(all(a));
#define SZ(a) int(a.size())
#define popcount(x) __builtin_popcountll(x)
#define pf push_front
#define pb push_back
#define ef emplace_front
#define eb emplace_back
#define ppf pop_front
#define ppb pop_back
#ifdef __LOCAL
#define debug(...) { cout << #__VA_ARGS__; cout << ": "; print(__VA_ARGS__); cout << flush; }
#else
#define debug(...) void(0);
#endif
#define INT(...) int __VA_ARGS__;scan(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;scan(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;scan(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;scan(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;scan(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;scan(__VA_ARGS__)
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using LP = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vp = vector<P>;
using vvp = vector<vp>;
using vlp = vector<LP>;
using vvlp = vector<vlp>;
template<class T>
using PQ = priority_queue<T>;
template<class T>
using PQrev = priority_queue<T, vector<T>, greater<T>>;

template<class S, class T>
istream &operator>>(istream &is, pair<S, T> &p) { return is >> p.first >> p.second; }

template<class S, class T>
ostream &operator<<(ostream &os, const pair<S, T> &p) { return os << '{' << p.first << ", " << p.second << '}'; }

template<class S, class T, class U>
istream &operator>>(istream &is, tuple<S, T, U> &t) { return is >> get<0>(t) >> get<1>(t) >> get<2>(t); }

template<class S, class T, class U>
ostream &operator<<(ostream &os, const tuple<S, T, U> &t) {
    return os << '{' << get<0>(t) << ", " << get<1>(t) << ", " << get<2>(t) << '}';
}

template<class T>
istream &operator>>(istream &is, vector<T> &v) {
    for (T &t: v) { is >> t; }
    return is;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    os << '[';
    rep(i, v.size()) os << v[i] << (i == int(v.size() - 1) ? "" : ", ");
    return os << ']';
}

template<class T>
ostream &operator<<(ostream &os, const deque<T> &v) {
    os << '[';
    rep(i, v.size()) os << v[i] << (i == int(v.size() - 1) ? "" : ", ");
    return os << ']';
}

template<class T>
ostream &operator<<(ostream &os, const set<T> &st) {
    os << '{';
    auto it = st.begin();
    while (it != st.end()) {
        os << (it == st.begin() ? "" : ", ") << *it;
        it++;
    }
    return os << '}';
}

template<class T>
ostream &operator<<(ostream &os, const multiset<T> &st) {
    os << '{';
    auto it = st.begin();
    while (it != st.end()) {
        os << (it == st.begin() ? "" : ", ") << *it;
        it++;
    }
    return os << '}';
}

template<class T, class U>
ostream &operator<<(ostream &os, const map<T, U> &mp) {
    os << '{';
    auto it = mp.begin();
    while (it != mp.end()) {
        os << (it == mp.begin() ? "" : ", ") << *it;
        it++;
    }
    return os << '}';
}

template<class T>
void vecout(const vector<T> &v, char div = '\n') {
    rep(i, v.size()) cout << v[i] << (i == int(v.size() - 1) ? '\n' : div);
}

template<class T>
bool constexpr chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
bool constexpr chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

void scan() {}

template<class Head, class... Tail>
void scan(Head &head, Tail &... tail) {
    cin >> head;
    scan(tail...);
}

template<class T>
void print(const T &t) { cout << t << '\n'; }

template<class Head, class... Tail>
void print(const Head &head, const Tail &... tail) {
    cout << head << ' ';
    print(tail...);
}

template<class... T>
void fin(const T &... a) {
    print(a...);
    exit(0);
}

template<class T>
vector<T> &operator+=(vector<T> &v, T x) {
    for (T &t: v) t += x;
    return v;
}

template<class T>
vector<T> &operator-=(vector<T> &v, T x) {
    for (T &t: v) t -= x;
    return v;
}

template<class T>
vector<T> &operator*=(vector<T> &v, T x) {
    for (T &t: v) t *= x;
    return v;
}

template<class T>
vector<T> &operator/=(vector<T> &v, T x) {
    for (T &t: v) t /= x;
    return v;
}

struct Init_io {
    Init_io() {
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        cout.tie(nullptr);
        cout << boolalpha << fixed << setprecision(15);
        cerr << boolalpha << fixed << setprecision(15);
    }
} init_io;

const string yes[] = {"no", "yes"};
const string Yes[] = {"No", "Yes"};
const string YES[] = {"NO", "YES"};
const int inf = 1001001001;
const ll linf = 1001001001001001001;

void rearrange(const vi &) {}

template<class T, class... Tail>
void rearrange(const vi &ord, vector<T> &head, Tail &...tail) {
    assert(ord.size() == head.size());
    vector<T> ori = head;
    rep(i, ord.size()) head[i] = ori[ord[i]];
    rearrange(ord, tail...);
}

template<class T, class... Tail>
void sort_by(vector<T> &head, Tail &... tail) {
    vi ord(head.size());
    iota(all(ord), 0);
    sort(all(ord), [&](int i, int j) { return head[i] < head[j]; });
    rearrange(ord, head, tail...);
}

bool in_rect(int i, int j, int h, int w) {
    return 0 <= i and i < h and 0 <= j and j < w;
}

template<class T, class S>
vector<T> cumsum(const vector<S> &v, bool shift_one = true) {
    int n = v.size();
    vector<T> res;
    if (shift_one) {
        res.resize(n + 1);
        rep(i, n) res[i + 1] = res[i] + v[i];
    } else {
        res.resize(n);
        if (n) {
            res[0] = v[0];
            rep(i, 1, n) res[i] = res[i - 1] + v[i];
        }
    }
    return res;
}

vvi graph(int n, int m, bool directed = false, int origin = 1) {
    vvi G(n);
    rep(_, m) {
        INT(u, v);
        u -= origin, v -= origin;
        G[u].pb(v);
        if (!directed) G[v].pb(u);
    }
    return G;
}

template<class T>
vector<vector<pair<int, T>>> weighted_graph(int n, int m, bool directed = false, int origin = 1) {
    vector<vector<pair<int, T>>> G(n);
    rep(_, m) {
        int u, v;
        T w;
        scan(u, v, w);
        u -= origin, v -= origin;
        G[u].eb(v, w);
        if (!directed) G[v].eb(u, w);
    }
    return G;
}

template<class T>
void resemble(vector<T> &v) {}

template<class T, class... Tail>
void resemble(vector<T> &v, vector<T> &head, Tail &...tail) {
    for (T &e: head) v.pb(e);
    resemble(v, tail...);
}

template<class T>
void renumber(vector<T> &v) {}

template<class T, class... Tail>
void renumber(vector<T> &v, vector<T> &head, Tail &...tail) {
    for (T &e: head) e = lower_bound(all(v), e) - v.begin();
    renumber(v, tail...);
}

template<class T, class... Tail>
vector<T> zip(vector<T> &head, Tail &... tail) {
    vector<T> v;
    resemble(v, head, tail...);
    sort(all(v));
    v.erase(unique(all(v)), v.end());
    renumber(v, head, tail...);
    return v;
}

int main() {
    vd w(2);
    double dr = 0;
    auto dfs = [&](auto &dfs, const deque<P> &a, const deque<P> &b, int x, double p) -> void {
//        debug(a, b, x);
        if (a.empty()) {
            if (b.empty()) dr += p;
            else w[x ^ 1] += p;
            return;
        }
        if (b.empty()) {
            w[x] += p;
            return;
        }
        auto na = a;
        P at = a[0];
        na.ppf();
        deque<P> nb;
        double np = p / SZ(b);
        rep(i, SZ(b)) {
            int ha = at.first - b[i].second;
            int hb = b[i].first - at.second;
            if (ha <= 0 and hb <= 0) {
                rep(j, i + 1, SZ(b)) nb.pb(b[j]);
                dfs(dfs, nb, na, x ^ 1, np);
                rep(j, i + 1, SZ(b)) nb.ppb();
            } else if (ha <= 0) {
                nb.eb(hb, b[i].second);
                rep(j, i + 1, SZ(b)) nb.pb(b[j]);
                dfs(dfs, nb, na, x ^ 1, np);
                rep(j, i, SZ(b)) nb.ppb();
            } else if (hb <= 0) {
                na.eb(ha, at.second);
                rep(j, i + 1, SZ(b)) nb.pb(b[j]);
                dfs(dfs, nb, na, x ^ 1, np);
                na.ppb();
                rep(j, i + 1, SZ(b)) nb.ppb();
            } else {
                assert(false);
            }
            nb.pb(b[i]);
        }
    };
    INT(n, m);
    // {HP, ATK}
    deque<P> a, b;
    rep(i, n) {
        INT(now);
        a.eb(now, now);
    }
    rep(i, m) {
        INT(now);
        b.eb(now, now);
    }
    if (n > m) {
        dfs(dfs, a, b, 0, 1);
    } else if (n < m) {
        dfs(dfs, b, a, 1, 1);
    } else {
        dfs(dfs, a, b, 0, 0.5);
        dfs(dfs, b, a, 1, 0.5);
    }
    print(w[0]);
    print(w[1]);
    print(dr);
}

詳細信息

Test #1:

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

input:

2 3
2 5
3 4 1

output:

0.125000000000000
0.750000000000000
0.125000000000000

result:

ok 3 numbers

Test #2:

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

input:

6 6
1 1 4 5 1 4
1 1 4 5 1 4

output:

0.241867283950625
0.241867283950620
0.516265432098777

result:

ok 3 numbers

Test #3:

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

input:

7 7
1 1 1 1 1 1 1
1 1 1 1 1 1 1

output:

0.000000000000000
0.000000000000000
0.999999999999997

result:

ok 3 numbers

Test #4:

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

input:

1 7
7
1 1 1 1 1 1 1

output:

0.000000000000000
0.000000000000000
1.000000000000001

result:

ok 3 numbers

Test #5:

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

input:

2 3
736618938 652769331
328875880 97571721 44608905

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #6:

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

input:

5 4
53585130 731696211 668322278 611205195 158818781
569587984 776042583 745745433 330119007

output:

0.066840277777778
0.664351851851852
0.268807870370370

result:

ok 3 numbers

Test #7:

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

input:

7 2
578505806 551611151 92903265 403642038 542119417 57334031 307573613
897644535 168524310

output:

0.999999999999999
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #8:

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

input:

5 6
113196606 64768263 772808463 787707989 500151952
481840741 676847825 4641268 431386165 847736311 169677832

output:

0.136323173868314
0.522397183641967
0.341279642489723

result:

ok 3 numbers

Test #9:

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

input:

6 6
260666773 527612597 471926610 702232282 559007797 606173983
560573055 928117268 101411867 875949818 907478252 182117037

output:

0.000000000000000
0.960819573045433
0.039180426954733

result:

ok 3 numbers

Test #10:

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

input:

3 3
333377599 3066695 67916629
426841530 865184552 974638244

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #11:

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

input:

1 1
529429019
529428649

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #12:

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

input:

3 3
12886596 817437415 465037461
12886473 817437448 465037967

output:

0.069444444444444
0.652777777777778
0.277777777777778

result:

ok 3 numbers

Test #13:

score: 0
Accepted
time: 20ms
memory: 3604kb

input:

6 6
211213374 319527017 257080158 176742665 53109345 33822515
53109265 319527076 176743175 257080012 211212799 33822353

output:

0.423399959276359
0.319386584790819
0.257213455932735

result:

ok 3 numbers

Test #14:

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

input:

1 2
1
1 1

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #15:

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

input:

1 2
1
1 3

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #16:

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

input:

1 2
2
4 2

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #17:

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

input:

1 2
3
5 5

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #18:

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

input:

1 2
4
1 2

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #19:

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

input:

1 2
5
2 5

output:

0.000000000000000
0.000000000000000
1.000000000000000

result:

ok 3 numbers

Test #20:

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

input:

1 2
5
5 5

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #21:

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

input:

2 2
1 1
1 3

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #22:

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

input:

2 2
1 1
2 3

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #23:

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

input:

2 2
1 4
2 5

output:

0.000000000000000
0.500000000000000
0.500000000000000

result:

ok 3 numbers

Test #24:

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

input:

2 2
2 2
1 4

output:

0.000000000000000
0.000000000000000
1.000000000000000

result:

ok 3 numbers

Test #25:

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

input:

2 2
3 2
4 1

output:

0.000000000000000
0.500000000000000
0.500000000000000

result:

ok 3 numbers

Test #26:

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

input:

2 2
3 3
1 3

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #27:

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

input:

2 2
3 3
2 4

output:

0.000000000000000
0.000000000000000
1.000000000000000

result:

ok 3 numbers

Test #28:

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

input:

2 2
3 3
5 3

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #29:

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

input:

2 2
4 3
2 1

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #30:

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

input:

2 2
4 3
4 4

output:

0.000000000000000
1.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #31:

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

input:

2 2
5 1
5 2

output:

0.125000000000000
0.625000000000000
0.250000000000000

result:

ok 3 numbers

Test #32:

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

input:

2 2
5 1
5 3

output:

0.125000000000000
0.625000000000000
0.250000000000000

result:

ok 3 numbers

Test #33:

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

input:

2 2
5 2
2 3

output:

0.875000000000000
0.000000000000000
0.125000000000000

result:

ok 3 numbers

Test #34:

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

input:

2 2
5 4
1 2

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #35:

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

input:

2 2
5 4
3 5

output:

0.875000000000000
0.000000000000000
0.125000000000000

result:

ok 3 numbers

Test #36:

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

input:

2 2
5 5
1 4

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #37:

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

input:

2 2
5 5
2 2

output:

1.000000000000000
0.000000000000000
0.000000000000000

result:

ok 3 numbers

Test #38:

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

input:

1 1
6
6

output:

0.000000000000000
0.000000000000000
1.000000000000000

result:

ok 3 numbers

Test #39:

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

input:

5 5
6 5 9 9 3
3 5 9 9 6

output:

0.297870370370370
0.278773148148149
0.423356481481481

result:

ok 3 numbers

Test #40:

score: 0
Accepted
time: 12ms
memory: 3576kb

input:

6 6
10 2 3 4 5 7
5 2 4 3 10 7

output:

0.254010456854445
0.192773705418373
0.553215837727277

result:

ok 3 numbers

Test #41:

score: 0
Accepted
time: 90ms
memory: 3552kb

input:

7 7
7 6 8 6 7 3 9
7 6 9 8 7 3 6

output:

0.310913751425596
0.365768367913656
0.323317880660188

result:

ok 3 numbers

Test #42:

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

input:

6 6
5 4 7 9 9 10
9 4 9 7 5 10

output:

0.216942435056590
0.327856545781905
0.455201019161534

result:

ok 3 numbers

Test #43:

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

input:

4 4
9 7 10 6
9 7 6 10

output:

0.330873842592592
0.262297453703704
0.406828703703704

result:

ok 3 numbers

Test #44:

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

input:

3 3
3 10 3
3 10 3

output:

0.187500000000000
0.187500000000000
0.625000000000000

result:

ok 3 numbers

Test #45:

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

input:

2 2
3 4
3 4

output:

0.000000000000000
0.000000000000000
1.000000000000000

result:

ok 3 numbers

Test #46:

score: 0
Accepted
time: 198ms
memory: 3520kb

input:

7 7
922750124 99645786 685060385 948410807 266950246 996521461 883971852
266950246 99645786 883971852 685060385 922750124 996521461 948410807

output:

0.363356371416496
0.279566405511425
0.357077223071731

result:

ok 3 numbers

Test #47:

score: 0
Accepted
time: 266ms
memory: 3560kb

input:

7 7
241155912 361580213 393947982 781406405 485516551 277202028 115028196
485516551 361580213 115028196 393947982 241155912 277202028 781406405

output:

0.370176093599497
0.278789945303297
0.351033961096207

result:

ok 3 numbers

Test #48:

score: 0
Accepted
time: 135ms
memory: 3688kb

input:

7 7
565748008 734938287 873800405 879803305 473331973 893190834 623040014
473331973 734938287 623040014 873800405 565748008 893190834 879803305

output:

0.364305908016448
0.315603554226816
0.320090537756083

result:

ok 3 numbers

Test #49:

score: 0
Accepted
time: 505ms
memory: 3556kb

input:

7 7
14 4 6 5 201506030 15 15
4 14 201506030 15 15 6 5

output:

0.178183791652252
0.337081509869527
0.484734698473989

result:

ok 3 numbers

Test #50:

score: 0
Accepted
time: 262ms
memory: 3560kb

input:

7 7
3 2 3 5 784861968 2 1
2 3 784861968 1 2 3 5

output:

0.223075021873216
0.316151580232901
0.460773397893052

result:

ok 3 numbers

Test #51:

score: 0
Accepted
time: 688ms
memory: 3544kb

input:

7 7
8 15 3 9 168061718 2 5
15 8 168061718 5 2 3 9

output:

0.212969595987902
0.319962995066568
0.467067408942209

result:

ok 3 numbers

Test #52:

score: 0
Accepted
time: 254ms
memory: 3524kb

input:

7 7
859736717 19 19 18 13 10 7
7 10 13 18 19 19 859736717

output:

0.393620652595134
0.147967266251657
0.458412081153160

result:

ok 3 numbers

Test #53:

score: 0
Accepted
time: 361ms
memory: 3560kb

input:

7 7
761045932 18 13 11 9 7 6
6 7 9 11 13 18 761045932

output:

0.382467689555023
0.147493238654744
0.470039071789757

result:

ok 3 numbers

Test #54:

score: 0
Accepted
time: 388ms
memory: 3560kb

input:

7 7
379524878 17 16 14 10 6 1
1 6 10 14 16 17 379524878

output:

0.379260293299643
0.176536722080089
0.444202984619763

result:

ok 3 numbers

Test #55:

score: 0
Accepted
time: 436ms
memory: 3716kb

input:

7 7
986258805 329018732 16 14 10 10 4
4 10 10 14 16 329018732 986258805

output:

0.335206523508017
0.168228186481939
0.496565290009573

result:

ok 3 numbers

Test #56:

score: 0
Accepted
time: 466ms
memory: 3640kb

input:

7 7
402437510 39859989 20 20 18 17 7
7 17 18 20 20 39859989 402437510

output:

0.328699473643126
0.160263058268800
0.511037468087525

result:

ok 3 numbers

Test #57:

score: 0
Accepted
time: 524ms
memory: 3640kb

input:

7 7
719895666 88341845 15 11 10 6 5
5 6 10 11 15 88341845 719895666

output:

0.341541058762741
0.169436596665838
0.489022344570712

result:

ok 3 numbers

Test #58:

score: 0
Accepted
time: 714ms
memory: 3720kb

input:

7 7
22 657372492 8 20 531193761 10 21
8 22 20 657372492 531193761 21 10

output:

0.283032035858704
0.214331641402764
0.502636322739306

result:

ok 3 numbers

Test #59:

score: 0
Accepted
time: 859ms
memory: 3556kb

input:

7 7
8 559730577 2 23 543514141 3 24
2 8 23 559730577 543514141 24 3

output:

0.283681616584301
0.222015713449458
0.494302669967911

result:

ok 3 numbers

Test #60:

score: 0
Accepted
time: 546ms
memory: 3560kb

input:

7 7
24 416408320 4 25 698151361 24 15
4 24 25 416408320 698151361 15 24

output:

0.297516368443154
0.247286586967633
0.455197044589997

result:

ok 3 numbers