QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#870821#8614. 3Ducup-team5243#WA 78ms4096kbC++1712.6kb2025-01-25 17:52:402025-01-25 17:52:42

Judging History

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

  • [2025-01-25 17:52:42]
  • 评测
  • 测评结果:WA
  • 用时:78ms
  • 内存:4096kb
  • [2025-01-25 17:52:40]
  • 提交

answer

//#ifdef NACHIA
//#define _GLIBCXX_DEBUG
//#else
//#define NDEBUG
//#endif
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using i64 = long long;
using u64 = unsigned long long;
#define rep(i,n) for(int i=0; i<int(n); i++)
const i64 INF = 1001001001001001001;
template<typename A> void chmin(A& l, const A& r){ if(r < l) l = r; }
template<typename A> void chmax(A& l, const A& r){ if(l < r) l = r; }
using namespace std;
#include <iterator>
#include <functional>
#include <utility>
#include <type_traits>

template<class Elem> struct vec;

template<class Iter>
struct seq_view{
    using Ref = typename std::iterator_traits<Iter>::reference;
    using Elem = typename std::iterator_traits<Iter>::value_type;
    Iter a, b;
    Iter begin() const { return a; }
    Iter end() const { return b; }
    int size() const { return (int)(b-a); }
    seq_view(Iter first, Iter last) : a(first), b(last) {}
    seq_view sort() const { std::sort(a, b); return *this; }
    Ref& operator[](int x) const { return *(a+x); }
    template<class F = std::less<Elem>, class ret = vec<int>> ret sorti(F f = F()) const {
        ret x(size()); for(int i=0; i<size(); i++) x[i] = i;
        x().sort([&](int l, int r){ return f(a[l],a[r]); });
        return x;
    }
    template<class ret = vec<Elem>> ret col() const { return ret(begin(), end()); }
    template<class ret = vec<Elem>> ret cumsum() const {
        auto res = ret(size() + 1, Elem(0));
        for(int i=0; i<size(); i++) res[i+1] = res[i] + operator[](i);
        return res;
    }
    template<class F = std::equal_to<Elem>, class ret = vec<std::pair<Elem, int>>>
    ret rle(F eq = F()) const {
        auto x = ret();
        for(auto& a : (*this)){
            if(x.size() == 0 || !eq(x[x.size()-1].first, a)) x.emp(a, 1); else x[x.size()-1].second++;
        } return x;
    }
    template<class F> seq_view sort(F f) const { std::sort(a, b, f); return *this; }
    Iter uni() const { return std::unique(a, b); }
    Iter lb(const Elem& x) const { return std::lower_bound(a, b, x); }
    Iter ub(const Elem& x) const { return std::upper_bound(a, b, x); }
    int lbi(const Elem& x) const { return lb(x) - a; }
    int ubi(const Elem& x) const { return ub(x) - a; }
    seq_view bound(const Elem& l, const Elem& r) const { return { lb(l), lb(r) }; }
    template<class F> Iter lb(const Elem& x, F f) const { return std::lower_bound(a, b, x, f); }
    template<class F> Iter ub(const Elem& x, F f) const { return std::upper_bound(a, b, x, f); }
    template<class F> Iter when_true_to_false(F f) const {
        if(a == b) return a;
        return std::lower_bound(a, b, *a,
            [&](const Elem& x, const Elem&){ return f(x); });
    }
    seq_view same(Elem x) const { return { lb(x), ub(x) }; }
    template<class F> auto map(F f) const {
        vec<decltype(f(std::declval<const typename Iter::value_type&>()))> r;
        for(auto& x : *this) r.emp(f(x));
        return r;
    }
    Iter max() const { return std::max_element(a, b); }
    Iter min() const { return std::min_element(a, b); }
    template<class F = std::less<Elem>>
    Iter min(F f) const { return std::min_element(a, b, f); }
    seq_view rev() const { std::reverse(a, b); return *this; }
};

template<class Elem>
struct vec {
public:
    using Base = typename std::vector<Elem>;
    using Iter = typename Base::iterator;
    using CIter = typename Base::const_iterator;
    using View = seq_view<Iter>;
    using CView = seq_view<CIter>;

    vec(){}
    explicit vec(int n, const Elem& value = Elem()) : a(0<n?n:0, value) {}
    template <class I2> vec(I2 first, I2 last) : a(first, last) {}
    vec(std::initializer_list<Elem> il) : a(std::move(il)) {}
    vec(Base b) : a(std::move(b)) {}
    operator Base() const { return a; }

    Iter begin(){ return a.begin(); }
    CIter begin() const { return a.begin(); }
    Iter end(){ return a.end(); }
    CIter end() const { return a.end(); }
    int size() const { return a.size(); }
    bool empty() const { return a.empty(); }
    Elem& back(){ return a.back(); }
    const Elem& back() const { return a.back(); }
    vec& sortuni(){ (*this)().sort(); a.erase((*this)().uni(), end()); return *this; }
    vec sortunied(){ vec x = *this; x.sortuni(); return x; }
    Iter operator()(int x){ return a.begin() + x; }
    CIter operator()(int x) const { return a.begin() + x; }
    View operator()(int l, int r){ return { (*this)(l), (*this)(r) }; }
    CView operator()(int l, int r) const { return { (*this)(l), (*this)(r) }; }
    View operator()(){ return (*this)(0,size()); }
    CView operator()() const { return (*this)(0,size()); }
    Elem& operator[](int x){ return a[x]; }
    const Elem& operator[](int x) const { return a[x]; }
    Base& operator*(){ return a; }
    const Base& operator*() const { return a; }
    vec& push(Elem args){
        a.push_back(std::move(args));
        return *this;
    }
    template<class... Args>
    vec& emp(Args &&... args){
        a.emplace_back(std::forward<Args>(args) ...);
        return *this;
    }
    template<class Range>
    vec& app(Range& x){ for(auto& v : x){ emp(v); } return *this; }
    Elem pop(){ Elem x = std::move(a.back()); a.pop_back(); return x; }
    void resize(int sz){ a.resize(sz); }
    void reserve(int sz){ a.reserve(sz); }
    bool operator==(const vec& r) const { return a == r.a; }
    bool operator!=(const vec& r) const { return a != r.a; }
    bool operator<(const vec& r) const { return a < r.a; }
    bool operator<=(const vec& r) const { return a <= r.a; }
    bool operator>(const vec& r) const { return a > r.a; }
    bool operator>=(const vec& r) const { return a >= r.a; }
    vec<vec<Elem>> pile(int n) const { return vec<vec<Elem>>(n, *this); }
    template<class F> vec& filter(F f){
        int p = 0;
        for(auto& x : a) if(f(x)) std::swap(a[p++],x);
        resize(p); return *this;
    }
    vec& operator+=(const vec& r){ return app(r); }
    vec operator+(const vec& r) const { vec x = *this; x += r; return x; }
    vec operator*(int t) const { vec res; while(t--){ res += *this; } return res; }
private: Base a;
};

template<class IStr, class U, class T>
IStr& operator>>(IStr& is, vec<std::pair<U,T>>& v){ for(auto& x:v){ is >> x.first >> x.second; } return is; }
template<class IStr, class T>
IStr& operator>>(IStr& is, vec<T>& v){ for(auto& x:v){ is >> x; } return is; }
template<class OStr, class T>
OStr& operator<<(OStr& os, const vec<T>& v){
    for(int i=0; i<v.size(); i++){
        if(i){ os << ' '; } os << v[i];
    } return os;
}
template<class OStr, class U, class T>
OStr& operator<<(OStr& os, const vec<std::pair<U,T>>& v){
    for(int i=0; i<v.size(); i++){
        if(i){ os << ' '; } os << '(' << v[i].first << ',' << v[i].second << ')';
    } return os;
}
#include <cmath>
#include <array>
#include <unordered_map>
#include <cassert>
#include <cstdint>


namespace nachia{

class Xoshiro256pp{
public:

    using i32 = int32_t;
    using u32 = uint32_t;
    using i64 = int64_t;
    using u64 = uint64_t;


private:
    std::array<u64, 4> s;

    // https://prng.di.unimi.it/xoshiro256plusplus.c
    static inline uint64_t rotl(const uint64_t x, int k) noexcept {
        return (x << k) | (x >> (64 - k));
    }
    inline uint64_t gen(void) noexcept {
        const uint64_t result = rotl(s[0] + s[3], 23) + s[0];
        const uint64_t t = s[1] << 17;
        s[2] ^= s[0];
        s[3] ^= s[1];
        s[1] ^= s[2];
        s[0] ^= s[3];
        s[2] ^= t;
        s[3] = rotl(s[3], 45);
        return result;
    }

    // https://xoshiro.di.unimi.it/splitmix64.c
    u64 splitmix64(u64& x) {
        u64 z = (x += 0x9e3779b97f4a7c15);
        z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9;
        z = (z ^ (z >> 27)) * 0x94d049bb133111eb;
        return z ^ (z >> 31);
    }

public:

    void seed(u64 x = 7001){
        assert(x != 0);
        s[0] = x;
        for(int i=1; i<4; i++) s[i] = splitmix64(x);
    }
    
    std::array<u64, 4> getState() const { return s; }
    void setState(std::array<u64, 4> a){ s = a; }

    Xoshiro256pp(){ seed(); }
    
    u64 rng64() { return gen(); }
    u64 operator()(){ return gen(); }

    // generate x : l <= x <= r
    u64 random_unsigned(u64 l,u64 r){
        assert(l<=r);
        r-=l;
        auto res = rng64();
        if(res<=r) return res+l;
        u64 d = r+1;
        u64 max_valid = 0xffffffffffffffff/d*d;
        while(true){
            auto res = rng64();
            if(res<=max_valid) break;
        }
        return res%d+l;
    }

    // generate x : l <= x <= r
    i64 random_signed(i64 l,i64 r){
        assert(l<=r);
        u64 unsigned_l = (u64)l ^ (1ull<<63);
        u64 unsigned_r = (u64)r ^ (1ull<<63);
        u64 unsigned_res = random_unsigned(unsigned_l,unsigned_r) ^ (1ull<<63);
        return (i64)unsigned_res;
    }


    // permute x : n_left <= x <= n_right
    // output r from the front
    template<class Int>
    std::vector<Int> random_nPr(Int n_left, Int n_right, Int r){
        Int n = n_right-n_left;

        assert(n>=0);
        assert(r<=(1ll<<27));
        if(r==0) return {};  
        assert(n>=r-1);

        std::vector<Int> V;
        std::unordered_map<Int,Int> G;
        for(int i=0; i<r; i++){
            Int p = random_signed(i,n);
            Int x = p - G[p];
            V.push_back(x);
            G[p] = p - (i - G[i]);
        }

        for(Int& v : V) v+=n_left;
        return V;
    }



    // V[i] := V[perm[i]]
    // using swap
    template<class E,class PermInt_t>
    void permute_inplace(std::vector<E>& V,std::vector<PermInt_t> perm){
        assert(V.size() == perm.size());
        int N=V.size();
        for(int i=0; i<N; i++){
            int p=i;
            while(perm[p]!=i){
                assert(0 <= perm[p] && perm[p] < N);
                assert(perm[p] != perm[perm[p]]);
                std::swap(V[p],V[perm[p]]);
                int pbuf = perm[p]; perm[p] = p; p = pbuf;
            }
            perm[p] = p;
        }
    }

    template<class E>
    std::vector<E> shuffle(const std::vector<E>& V){
        int N=V.size();
        auto P = random_nPr(0,N-1,N);
        std::vector<E> res;
        res.reserve(N);
        for(int i=0; i<N; i++) res.push_back(V[P[i]]);
        return res;
    }

    // shuffle using swap
    template<class E>
    void shuffle_inplace(std::vector<E>& V){
        int N=V.size();
        permute_inplace(V,random_nPr(0,N-1,N));
    }


};

} // namespace nachia
#include <random>
#include <chrono>
nachia::Xoshiro256pp rng;
namespace RngInitInstance { struct RngInit { RngInit(){
    unsigned long long seed1 = std::random_device()();
    unsigned long long seed2 = std::chrono::high_resolution_clock::now().time_since_epoch().count();
    rng.seed(seed1 ^ seed2);
} } a; }


double D[10][10];

double randomFloat(){
    return rng.rng64() / 18446744073709551615.0;
}

double dist(array<double, 3> a, array<double, 3> b){
    double x = a[0] - b[0];
    double y = a[1] - b[1];
    double z = a[2] - b[2];
    return sqrt(x*x + y*y + z*z);
}

void gen(){
    int N = 1;
    vec<array<double, 3>> H(N);
    rep(i,N) rep(a,3) H[i][a] = randomFloat();
    rep(i,N) rep(j,N) {
        if(i == j){ D[i][j] = 0.0; continue; }
        double d = dist(H[i], H[j]);
        D[i][j] = d + randomFloat() * 0.2 - 0.1;
    }
}

void testcase(){
    i64 N; cin >> N;
    rep(i,N) rep(j,N) cin >> D[i][j];

    vec<array<double, 3>> H(N);
    rep(i,N) rep(a,3) H[i][a] = rng.random_signed(0,1.0e9) / 1.0e9;
    auto sc = [&](){
        double s = 0;
        rep(i,N) rep(j,i){
            double d = abs(D[i][j] - dist(H[i], H[j]));
            if(d <= 0.1) s += d; else s += d * 100.0;
        }
        return s;
    };
    double sch = sc();
    rep(i,500000){
        vec<array<double, 3>> G = H;
        int x = rng.random_signed(0,N-1);
        double d = randomFloat() / 10.0;
        rep(a,3) H[x][a] += randomFloat() * d * 2 - d;
        double scg = sch;
        sch = sc();
        if(sch > scg){ swap(H, G); swap(sch, scg); }
    }
    //cout << sch << endl;
    rep(a,3){
        double off = 0;
        rep(i,N){
            if(H[i][a] < -5.0) off = -5.0 - H[i][a];
            if(H[i][a] > 5.0) off = 5.0 - H[i][a];
        }
        rep(i,N) H[i][a] += off;
    }
    cout.precision(10);
    rep(i,N){
        auto [x,y,z] = H[i];
        cout << x << " " << y << " " << z << "\n";
    }
}

int main(){
    ios::sync_with_stdio(false); cin.tie(nullptr);
    testcase();
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 27ms
memory: 3968kb

input:

4
0.000000 0.758400 0.557479 0.379026
0.758400 0.000000 0.516608 0.446312
0.557479 0.516608 0.000000 0.554364
0.379026 0.446312 0.554364 0.000000

output:

0.750459996 0.2903406648 0.8730124008
0.6634450755 1.027707174 0.7465953942
0.3343954508 0.6603687393 0.9004553823
0.8734972652 0.634850539 0.7738216846

result:

ok OK. Max delta: 0.005232

Test #2:

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

input:

1
0.000000

output:

5 -5 5

result:

ok OK. Max delta: 0.000000

Test #3:

score: 0
Accepted
time: 22ms
memory: 4096kb

input:

2
0.000000 0.938096
0.938096 0.000000

output:

0.05917184458 0.2839200999 0.2391764494
0.816770778 0.8353202219 0.2841859048

result:

ok OK. Max delta: 0.000000

Test #4:

score: 0
Accepted
time: 24ms
memory: 4096kb

input:

3
0.000000 0.769195 0.308169
0.769195 0.000000 0.686850
0.308169 0.686850 0.000000

output:

0.282032282 0.2671425843 0.3399116934
0.6308797275 0.4317610016 1.005394204
0.5897527398 0.2833041923 0.336042337

result:

ok OK. Max delta: 0.000000

Test #5:

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

input:

5
0.000000 0.444506 0.292333 0.209539 1.195824
0.444506 0.000000 0.220873 0.748833 0.757486
0.292333 0.220873 0.000000 0.533499 0.797167
0.209539 0.748833 0.533499 0.000000 1.141148
1.195824 0.757486 0.797167 1.141148 0.000000

output:

0.5980453117 0.6151490396 0.4579999444
0.500596781 0.2349390508 0.8011091874
0.4521059906 0.3679484759 0.6315739816
0.4704404512 0.6645745062 0.1885296992
-0.07890490461 -0.2265061641 0.6428930587

result:

ok OK. Max delta: 0.100000

Test #6:

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

input:

6
0.000000 0.932377 0.787009 0.996894 0.763544 0.651377
0.932377 0.000000 0.421278 1.155673 1.149686 0.508563
0.787009 0.421278 0.000000 0.709021 0.793974 0.224884
0.996894 1.155673 0.709021 0.000000 0.392548 0.957498
0.763544 1.149686 0.793974 0.392548 0.000000 0.714079
0.651377 0.508563 0.224884 0...

output:

0.318169712 0.9503231935 0.5147517354
0.4134770145 0.3041727728 -0.1506285362
0.5827488056 0.2647084906 0.2331216178
0.4380388142 0.07815195705 0.9824600523
0.6258147785 0.4227507529 0.9730397851
0.6725781884 0.4697822959 0.2544342215

result:

ok OK. Max delta: 0.098193

Test #7:

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

input:

7
0.000000 0.688481 0.455407 0.777049 0.963980 0.255052 0.554599
0.688481 0.000000 0.596921 0.827787 1.260207 0.340235 0.493011
0.455407 0.596921 0.000000 0.609173 0.640567 0.352193 0.243913
0.777049 0.827787 0.609173 0.000000 0.858134 0.701131 0.393303
0.963980 1.260207 0.640567 0.858134 0.000000 0...

output:

0.4908838526 0.1596690384 0.6850250683
0.3654435616 0.7475488132 0.9312397812
0.1323123572 0.3853373663 0.5179871367
0.4744528913 0.6853668826 0.113022318
-0.159718393 0.1240604463 -0.02538994601
0.4013901321 0.390833312 0.7450744092
0.3092014743 0.6071979646 0.4619878527

result:

ok OK. Max delta: 0.063740

Test #8:

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

input:

8
0.000000 0.437494 0.934265 0.074097 0.673669 0.425700 0.479212 0.679270
0.437494 0.000000 0.331045 0.393801 0.527073 0.402792 0.375134 0.461133
0.934265 0.331045 0.000000 0.792317 0.605663 0.880433 0.786178 0.455534
0.074097 0.393801 0.792317 0.000000 0.681633 0.278020 0.327267 0.550058
0.673669 0...

output:

0.6559807934 0.8433024903 0.3653651049
0.3910480322 0.4570266356 0.3843390245
0.4483231973 0.03682248054 0.307248923
0.5535355368 0.8037206368 0.4762482722
0.2704441188 0.4869830292 -0.0568144709
0.2445834931 0.8583251875 0.4734956253
0.2800296289 0.7281410916 0.6392995643
0.4602698239 0.2807042386 ...

result:

ok OK. Max delta: 0.099994

Test #9:

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

input:

9
0.000000 0.883128 0.449200 0.525234 0.745161 0.323207 0.430759 1.247103 0.564870
0.883128 0.000000 0.664206 0.590150 0.433578 0.890708 0.741718 0.798316 1.033522
0.449200 0.664206 0.000000 0.326949 0.636800 0.523900 0.642051 0.680925 0.349474
0.525234 0.590150 0.326949 0.000000 0.523965 0.344241 0...

output:

0.2831502309 0.6233169693 1.089705041
0.8450663354 0.7904505863 0.4273369729
0.2665473139 0.3930479389 0.6100010895
0.3272933497 0.7117364262 0.6506825794
0.8941944475 0.4553319133 0.6976921704
0.05013915883 0.8121951538 0.8285519205
0.7051348831 0.3481050513 1.070187543
0.498437322 0.2159791339 -0....

result:

ok OK. Max delta: 0.099998

Test #10:

score: 0
Accepted
time: 74ms
memory: 4096kb

input:

10
0.000000 1.141963 0.357381 0.960442 0.887799 0.393165 1.000015 0.883861 1.059968 0.666258
1.141963 0.000000 0.730979 0.430440 0.528721 0.822481 0.567380 0.334929 0.552413 0.840500
0.357381 0.730979 0.000000 0.861027 0.623726 0.216981 0.719423 0.558824 0.726378 0.310217
0.960442 0.430440 0.861027 ...

output:

0.492256571 1.012677697 0.2816285426
0.7403371451 0.02046441435 0.7871801442
0.4951555217 0.7350417061 0.506648622
1.057529241 0.1923167449 0.4268580474
0.4117010581 0.1330190967 0.3705399643
0.696475415 0.8056342912 0.5462183399
0.9926258657 0.1665613623 0.3004458735
0.5795413796 0.1307309002 0.514...

result:

ok OK. Max delta: 0.100000

Test #11:

score: 0
Accepted
time: 74ms
memory: 4096kb

input:

10
0.000000 0.508467 0.359704 0.705660 0.752608 0.632298 0.433047 0.541855 0.108842 0.652503
0.508467 0.000000 0.849608 0.542157 0.614068 0.673963 0.552462 0.470005 0.697815 0.822930
0.359704 0.849608 0.000000 0.832286 0.790254 0.844729 0.428335 0.707356 0.221649 0.447522
0.705660 0.542157 0.832286 ...

output:

0.3710482095 0.793796456 0.5228293248
0.4332878239 0.670321736 -0.003471975615
0.3050579853 0.6284148298 0.8353463578
0.6842528529 0.2516049424 0.1974261342
0.1651277662 0.1538308697 0.1924978059
0.5124001318 1.261862429 0.3096544537
0.1511964251 0.4218934831 0.4930754233
0.1384084168 0.5104613641 0...

result:

ok OK. Max delta: 0.099994

Test #12:

score: 0
Accepted
time: 76ms
memory: 4096kb

input:

10
0.000000 0.532841 1.081715 0.791902 0.304710 0.943952 0.318604 0.512618 0.263399 0.317304
0.532841 0.000000 0.617254 0.571776 0.863445 0.644868 0.534570 0.898453 0.767957 0.380512
1.081715 0.617254 0.000000 0.498716 1.118400 0.375946 0.739541 1.081104 0.985516 0.778030
0.791902 0.571776 0.498716 ...

output:

0.4999130885 0.7033306246 0.8784650076
0.9779157668 0.6100229691 0.5019257659
1.013545744 0.01322474383 0.4054727074
0.6351920893 0.2654556293 0.2006833828
0.2086125453 0.7368592367 0.7955393395
0.7412377895 0.03925741833 0.3173045518
0.5310263289 0.3557467978 0.6481502575
0.1144457724 0.7067110603 ...

result:

ok OK. Max delta: 0.099989

Test #13:

score: 0
Accepted
time: 70ms
memory: 4096kb

input:

10
0.000000 0.337812 0.820740 0.714576 0.958294 1.114603 1.052855 0.816204 0.921684 0.581533
0.337812 0.000000 0.588126 0.550959 0.851936 1.076003 0.824637 0.634512 0.630209 0.781504
0.820740 0.588126 0.000000 0.754545 0.853344 0.651402 0.625435 0.521290 0.463145 0.927492
0.714576 0.550959 0.754545 ...

output:

0.36084733 1.280734456 0.3511875446
0.6587328412 1.129193379 0.3020088043
0.8311111126 0.5687939982 0.2558247447
0.1669975482 0.7064054654 0.2455765495
0.7307046972 0.7962460991 1.090669594
0.5695283559 0.2789097373 0.7929843956
0.7794491018 0.437454997 0.8120819243
0.7878202281 0.7032956574 0.72768...

result:

ok OK. Max delta: 0.099992

Test #14:

score: 0
Accepted
time: 73ms
memory: 4096kb

input:

10
0.000000 0.157221 0.630350 0.940948 0.790907 0.666502 0.536584 0.506196 0.353744 0.642539
0.157221 0.000000 0.582092 1.279081 0.812532 0.810677 0.850103 0.865478 0.320962 0.694578
0.630350 0.582092 0.000000 1.171965 1.045437 1.168568 0.582206 0.854963 0.513105 1.137099
0.940948 1.279081 1.171965 ...

output:

0.7231150003 0.5277036516 0.3274056412
0.9184075422 0.6908981838 0.3646558255
0.4927823327 1.040322587 0.159637271
-0.1214389025 0.07953080936 0.4300455068
0.3615646301 0.4742907061 1.028744738
0.688090381 0.1853854855 0.9319606449
0.1864825838 0.5313214652 0.3253085043
0.216945526 0.2709048287 0.41...

result:

ok OK. Max delta: 0.099993

Test #15:

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

input:

10
0.000000 0.655953 0.416075 0.956128 0.351321 0.411663 0.904277 0.786858 0.961004 1.159073
0.655953 0.000000 0.398507 0.430374 0.378366 0.531641 0.789955 0.396050 0.368849 1.088933
0.416075 0.398507 0.000000 0.976294 0.461240 0.328488 0.979923 0.705916 0.884932 1.254989
0.956128 0.430374 0.976294 ...

output:

0.2497086369 -0.05286542815 0.1959087959
0.4339272609 0.576691194 0.1886446111
0.6078451589 0.124137059 0.07960391384
0.02081970581 0.8094492331 0.3643694757
0.3385743231 0.2625957614 0.3768131964
0.5650270084 0.1090804465 0.4049463466
0.1799449029 0.4715574119 0.9292320021
0.06613517515 0.708792313...

result:

ok OK. Max delta: 0.099454

Test #16:

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

input:

10
0.000000 0.672245 0.576475 0.810904 0.599396 0.493165 0.431514 0.511677 0.859634 0.881368
0.672245 0.000000 1.249406 1.027657 0.113558 0.392208 0.862698 0.329856 1.012059 1.039747
0.576475 1.249406 0.000000 0.869439 1.254676 1.087547 0.535956 1.182094 0.744887 0.645939
0.810904 1.027657 0.869439 ...

output:

0.7585765679 0.7525984347 0.827698716
0.108563265 0.5951371284 0.8955231859
1.308902762 0.4442790017 0.5833660701
0.673381482 0.4943646027 0.05733438231
0.1051994726 0.6299374929 0.7874239307
0.4468129224 0.5857337764 1.169496553
0.8374364716 0.6031275669 0.485334522
0.2912140884 0.8205094573 1.0525...

result:

ok OK. Max delta: 0.100000

Test #17:

score: 0
Accepted
time: 73ms
memory: 4096kb

input:

10
0.000000 0.609276 0.612588 0.898616 0.668529 0.802163 0.126104 0.681054 0.761434 0.310892
0.609276 0.000000 0.922363 0.423227 0.591390 0.662160 0.751720 0.241917 0.563127 0.693959
0.612588 0.922363 0.000000 0.873479 0.681583 0.707351 0.595097 0.923846 0.768951 0.393683
0.898616 0.423227 0.873479 ...

output:

0.2666976403 0.221358996 0.2904970361
0.8187902242 0.4528840266 0.626996554
-0.09548309687 0.5744282429 0.6360953168
0.7071925461 0.917470931 0.6045101444
0.4826993318 0.8476610793 0.3999772792
0.458365022 0.9928636461 0.4967294166
0.2527648012 0.3264144907 0.2221505582
0.7452378564 0.6687919795 0.4...

result:

ok OK. Max delta: 0.099510

Test #18:

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

input:

10
0.000000 0.542508 0.426558 0.741404 0.733105 0.586307 0.271270 0.847645 0.757695 0.830800
0.542508 0.000000 0.497136 1.012191 1.083431 0.944439 0.618287 0.696705 0.472089 0.354373
0.426558 0.497136 0.000000 0.973354 0.928175 0.884683 0.594828 0.699473 0.534409 0.737409
0.741404 1.012191 0.973354 ...

output:

0.4417155812 0.8004260212 0.4423014652
0.7722629326 0.3957782295 0.6304063643
0.7863243665 0.4584463301 0.2384971564
-0.1354901556 0.465011314 0.7648864973
-0.1402780518 0.4319358428 0.1914318517
-0.02170689288 0.5381809615 0.1927053031
0.4359971002 0.8509510911 0.1880608849
0.1801259028 0.040490761...

result:

ok OK. Max delta: 0.100000

Test #19:

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

input:

10
0.000000 1.061016 0.689894 0.927767 0.698893 0.765947 0.661068 0.306274 0.338125 0.696899
1.061016 0.000000 0.648243 1.014484 1.091752 0.749377 0.935557 1.183802 0.696073 0.582378
0.689894 0.648243 0.000000 0.480864 0.914770 0.542060 0.834022 0.683526 0.147432 0.385821
0.927767 1.014484 0.480864 ...

output:

0.7951100684 0.6557649887 0.6786345662
0.4702939541 0.1122750671 -0.1366418914
0.2703126685 0.4779434189 0.3599110435
0.0163613494 0.2194110766 0.6759802471
0.76819146 -0.06867350298 0.8985431758
0.4861912837 0.03439160394 0.5911430864
0.7157054478 -0.03151168507 0.7546451004
0.6786939169 0.48954153...

result:

ok OK. Max delta: 0.099998

Test #20:

score: -100
Wrong Answer
time: 78ms
memory: 4096kb

input:

10
0.000000 0.628979 0.809480 0.577228 0.543499 1.184491 0.915473 0.675321 0.902183 0.959077
0.628979 0.000000 0.645170 0.420946 0.821186 0.479130 0.411255 0.481181 0.640513 0.425707
0.809480 0.645170 0.000000 0.338814 0.659221 0.790485 0.676700 0.571793 1.093424 0.897873
0.577228 0.420946 0.338814 ...

output:

0.1133880796 0.6482823821 0.0734380528
0.479101344 0.4303663765 0.7364858001
0.1017144699 0.8078137738 0.6254745451
0.06142723156 0.4950809759 0.7310472073
0.112920431 0.212287763 0.154704497
0.8658941922 0.4529598363 0.8296236429
0.1688088136 0.3844952673 1.015378741
0.6082031845 0.4423926374 0.378...

result:

wrong answer Expected distance between 0 and 1 is 0.628979, but found 0.787950