QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#871354#8614. 3Ducup-team4435#AC ✓1080ms4096kbC++204.1kb2025-01-25 20:27:542025-01-25 20:27:59

Judging History

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

  • [2025-01-25 20:27:59]
  • 评测
  • 测评结果:AC
  • 用时:1080ms
  • 内存:4096kb
  • [2025-01-25 20:27:54]
  • 提交

answer

#pragma GCC optimize("unroll-loops,O3")

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

using ll = long long;
using ld = double;

#define all(a) begin(a), end(a)
#define len(a) int((a).size())

using P = array<ld, 3>;

const int N = 1000;

ld sqr(ld x) {
    return x * x;
}

ld dist(P a, P b) {
    return sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]);
}

int main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    cout << fixed << setprecision(10);

    int n;
    cin >> n;
    vector<vector<ld>> dists(n, vector<ld>(n));
    for (auto &v : dists) {
        for (auto &x : v) {
            cin >> x;
        }
    }

    vector<vector<ld>> dists2(n, vector<ld>(n));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            dists2[i][j] = sqr(dists[i][j]);
        }
    }

    vector<P> ans(n);
    ans[0] = {0, 0, 0};

    auto get_error = [&]() {
        ld max_error = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                ld cur = sqrt(dist(ans[i], ans[j]));
                ld expected = dists[i][j];
                max_error = max(max_error, fabs(expected - cur));
            }
        }
        return max_error;
    };

    auto g = [&](int x) {
        return ld(x) / N;
    };

    for (int i = 1; i < n; i++) {
        ld best = 1e18;
        int z = -N;
        for (int x = -N; x <= N; x++) {
            for (int y = -N; y <= N; y++) {
                ld gx = g(x), gy = g(y);
                auto f = [&](int z) {
                    ld gz = g(z);
                    ld f = 0;
                    for (int j = 0; j < i; j++) {
                        f = max(f, fabs(dists2[i][j] - dist(ans[j], {gx, gy, gz})));
                    }
                    return f;
                };

                ld cur = f(z);
                while (true) {
                    ld nxt = f(z + 1);
                    if (nxt < cur) {
                        cur = nxt;
                        z++;
                    } else {
                        break;
                    }
                }
                while (true) {
                    ld nxt = f(z - 1);
                    if (nxt < cur) {
                        cur = nxt;
                        z--;
                    } else {
                        break;
                    }
                }
                if (cur < best) {
                    best = cur;
                    ans[i] = {gx, gy, g(z)};
                }
            }
        }
    }

    // cout << get_error() << endl;
    const ld EPS = 0.09999;

    ld temp = 0.001;
    int iteration = 0;
    while (get_error() > 0.1) {
        vector<P> force(n);
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (i == j) {
                    continue;
                }
                P vec;
                for (int k = 0; k < 3; k++) {
                    vec[k] = ans[j][k] - ans[i][k];
                }

                ld cur = sqrt(dist(ans[i], ans[j]));
                ld expected = dists[i][j];
                if (cur > expected + EPS) {
                    ld coeff = cur - (expected + EPS);
                    for (int k = 0; k < 3; k++) {
                        force[i][k] += vec[k] * coeff;
                    }
                } else if (cur < expected - EPS) {
                    ld coeff = (expected - EPS) - cur;
                    for (int k = 0; k < 3; k++) {
                        force[i][k] -= vec[k] * coeff;
                    }
                }
            }
        }

        for (int i = 0; i < n; i++) {
            for (int k = 0; k < 3; k++) {
                ans[i][k] += force[i][k] * temp;
            }
        }

        // temp *= 0.99999;
        iteration++;
        if (iteration % int(1e6) == 0) {
            cout << iteration << ": " << get_error() << endl;
        }
    }

    for (auto [x, y, z] : ans) {
        cout << x << ' ' << y << ' ' << z << '\n';
    }
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 158ms
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.0000000000 0.0000000000 0.0000000000
-0.7510000000 -0.0990000000 0.0370000000
-0.4550000000 0.3220000000 -0.0080000000
-0.3170000000 -0.2120000000 0.0220000000

result:

ok OK. Max delta: 0.002965

Test #2:

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

input:

1
0.000000

output:

0.0000000000 0.0000000000 0.0000000000

result:

ok OK. Max delta: 0.000000

Test #3:

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

input:

2
0.000000 0.938096
0.938096 0.000000

output:

0.0000000000 0.0000000000 0.0000000000
-0.9240000000 -0.1620000000 0.0020000000

result:

ok OK. Max delta: 0.000000

Test #4:

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

input:

3
0.000000 0.769195 0.308169
0.769195 0.000000 0.686850
0.308169 0.686850 0.000000

output:

0.0000000000 0.0000000000 0.0000000000
-0.7300000000 -0.1950000000 0.1440000000
-0.0460000000 -0.2480000000 0.1770000000

result:

ok OK. Max delta: 0.000031

Test #5:

score: 0
Accepted
time: 261ms
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.0072493512 0.0258979537 -0.0204938680
-0.4049421529 -0.1764161546 0.0929823176
-0.2201382160 -0.2034272109 -0.0164763469
0.2615810311 0.0912064920 -0.0403970101
-0.2347500134 -0.8132610802 0.6413849075

result:

ok OK. Max delta: 0.100000

Test #6:

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

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.0000000000 0.0000000000 0.0000000000
-0.9300000000 -0.0490000000 0.0450000000
-0.6706522553 -0.0873468287 0.3658399283
-0.2510000000 -0.1980000000 0.9560000000
-0.0180000000 0.0800000000 0.7480000000
-0.5393477447 0.1493468287 0.1861600717

result:

ok OK. Max delta: 0.100000

Test #7:

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

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.0000000000 0.0000000000 0.0000000000
-0.6830000000 -0.0860000000 0.0110000000
-0.2830000000 0.3470000000 -0.0830000000
-0.3240000000 0.2070000000 -0.6750000000
0.0150000000 0.9080000000 -0.2760000000
-0.3140000000 0.0310000000 -0.0080000000
-0.4180000000 0.2090000000 -0.2750000000

result:

ok OK. Max delta: 0.060576

Test #8:

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

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.0000000000 0.0000000000 0.0000000000
-0.1649474388 -0.0671502200 0.4083865692
-0.3230525612 -0.1288497800 0.8046134308
0.0210000000 0.0930000000 0.1220000000
-0.6100000000 0.1280000000 0.3110000000
-0.0120000000 0.3100000000 0.1610000000
0.1440000000 0.2280000000 0.3370000000
0.0690000000 0.036000...

result:

ok OK. Max delta: 0.100000

Test #9:

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

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.0177634831 0.0273235863 -0.0715086052
-0.8173910888 -0.3254314970 0.0477834490
-0.2678823334 -0.1843736322 -0.2618650272
-0.4149069532 -0.0114971672 -0.2636921242
-0.5256854288 -0.5440342358 0.0420146513
-0.1258673643 0.1791145230 -0.4509256882
-0.1350115626 -0.3055030893 0.2619517928
-0.90941738...

result:

ok OK. Max delta: 0.100000

Test #10:

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

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.0000000000 0.0000000000 0.0000000000
-0.9809939775 -0.4522008322 0.3123483438
-0.3232333628 -0.1647076842 0.1386830917
-1.0089197054 -0.2569065880 -0.1793772818
-0.8330000000 0.0620000000 0.3540000000
-0.3132185600 -0.1896972379 -0.0340120741
-1.0000000000 -0.0570000000 -0.1050000000
-0.9175277803...

result:

ok OK. Max delta: 0.100000

Test #11:

score: 0
Accepted
time: 1050ms
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.0000000000 0.0000000000 0.0000000000
-0.5045671695 -0.0709191511 0.0431981483
0.3380000000 -0.0880000000 -0.0860000000
-0.3510000000 -0.5710000000 -0.1650000000
-0.1951899352 -0.6264355640 0.2632565457
-0.2920000000 0.4230000000 -0.2780000000
0.0251899352 -0.3605644360 0.2157434543
-0.2694328305 -...

result:

ok OK. Max delta: 0.100000

Test #12:

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

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.0168601930 -0.0321111806 0.0338656366
-0.4940107611 -0.0759233255 0.2085106463
-0.7630000000 -0.1220000000 0.7570000000
-0.3033752930 0.0625617675 0.7357530199
0.2161457118 -0.3546742344 0.1753605251
-0.4580000000 -0.0240000000 0.8430000000
-0.1013139847 -0.0506191675 0.4350059837
0.2724502295 -0....

result:

ok OK. Max delta: 0.100000

Test #13:

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

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.0300713736 -0.0442440563 0.0167376555
-0.2205956150 0.0493993418 0.1283733246
-0.7706811824 0.2960785028 0.0969001665
-0.5932991097 -0.3976681382 -0.0181164620
-0.4878646887 0.0849298898 0.9016803412
-0.9889309181 -0.0634057538 0.7195858967
-0.9212944336 0.1477109387 0.5779341652
-0.7122007313 0....

result:

ok OK. Max delta: 0.100000

Test #14:

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

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.0081960742 0.0050672649 -0.0063849056
-0.1374688521 -0.0753228271 0.0185195162
-0.3132235009 -0.0853276575 -0.5328604508
0.7845953702 0.4997422773 -0.4777537808
0.0150000000 0.7520000000 -0.0710000000
0.2550000000 0.5860000000 0.2350000000
0.2911206228 0.2306899955 -0.5156474212
0.4677802857 0.275...

result:

ok OK. Max delta: 0.100000

Test #15:

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

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.0000000000 0.0000000000 0.0000000000
-0.5625741313 -0.3391803141 0.0880680829
-0.3570000000 -0.1070000000 -0.1850000000
-0.6074336387 -0.5528096896 0.5714297249
-0.2110000000 -0.2130000000 0.2210000000
-0.0948972436 -0.3226064601 -0.0671299426
-0.0840000000 -0.8360000000 0.3930000000
-0.6352451824...

result:

ok OK. Max delta: 0.100000

Test #16:

score: 0
Accepted
time: 1056ms
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.0432586266 0.0397736281 0.0174406005
-0.5407013236 -0.3454718757 0.1402074853
0.4836140042 0.2478501878 -0.1276528494
0.3646041249 -0.6749388491 -0.1552841112
-0.4333218842 -0.4179057034 0.1058582594
-0.5104040382 -0.0205635334 -0.2259854637
0.1985372218 -0.1417246977 -0.2746235399
-0.5549017583 ...

result:

ok OK. Max delta: 0.100000

Test #17:

score: 0
Accepted
time: 1033ms
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.0105289391 -0.0220659681 -0.0216179281
-0.5620000000 -0.2270000000 0.0620000000
0.3120000000 -0.4890000000 0.1970000000
-0.5558810882 -0.6504845053 0.2094592594
-0.2637784171 -0.6572792644 -0.0429859091
-0.2840005073 -0.7789997647 0.1040002040
0.0834710609 -0.1749340319 -0.1713820719
-0.5350000000...

result:

ok OK. Max delta: 0.100000

Test #18:

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

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.0003760189 0.0214079608 -0.0343531391
-0.4566980107 -0.1711271408 0.1413532786
-0.1551693143 -0.3815608128 -0.0380028331
0.2951607986 0.1282543046 0.7461546712
0.5333579966 -0.0034855448 0.3068315260
0.4324805196 0.0925618156 0.1755804032
0.0485840407 0.1186622017 -0.1665666070
0.0334092832 -0.26...

result:

ok OK. Max delta: 0.100000

Test #19:

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

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.0115838055 -0.0184696644 0.0185420769
-0.3090000000 -0.0070000000 1.0150000000
-0.1695493511 -0.4194650140 0.5257099517
0.1954542509 -0.7331497886 0.5250381243
0.6300000000 -0.0470000000 0.4000000000
0.3162127571 -0.2183506193 0.6738788018
0.5087872429 -0.0166493807 0.5041211982
0.2590000000 -0.2...

result:

ok OK. Max delta: 0.100000

Test #20:

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

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.0000000000 0.0000000000 0.0000000000
-0.5624072220 -0.2206092671 0.1927924568
-0.6460000000 -0.2020000000 -0.4440000000
-0.5490000000 -0.0180000000 -0.1770000000
-0.0190000000 -0.3420000000 -0.3980000000
-0.8951415951 -0.6619918429 0.0251248421
-0.8420000000 -0.0350000000 0.0740000000
-0.390000000...

result:

ok OK. Max delta: 0.100000

Test #21:

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

input:

10
0.000000 1.348062 0.906255 1.056869 0.692737 1.233088 1.241780 0.765549 0.485628 0.823618
1.348062 0.000000 0.835159 0.531092 0.980818 0.271515 0.366699 0.868310 0.952290 0.828378
0.906255 0.835159 0.000000 0.460229 0.654184 0.642472 0.775590 0.878833 0.474961 0.920338
1.056869 0.531092 0.460229 ...

output:

0.0000000000 0.0000000000 0.0000000000
-0.9755218013 -0.6985052715 0.6013606662
-0.2140000000 -0.8250000000 0.3080000000
-0.6620000000 -0.7980000000 0.2050000000
-0.0991313069 -0.2660005713 0.6396392778
-0.9244781987 -0.8324947285 0.2586393338
-0.9990000000 -0.7300000000 0.2110000000
-0.3028686931 -...

result:

ok OK. Max delta: 0.100000

Test #22:

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

input:

10
0.000000 0.329257 0.705789 0.891723 1.151056 0.462469 1.051266 0.851658 0.464279 0.417320
0.329257 0.000000 0.600718 0.970605 0.938181 0.326375 1.043915 0.847296 0.532934 0.745040
0.705789 0.600718 0.000000 1.011572 0.883348 0.772478 0.845990 0.814815 0.707183 0.894030
0.891723 0.970605 1.011572 ...

output:

0.0013276934 0.0012703737 0.0149091237
-0.3287899488 -0.0349042035 0.0171089924
-0.4400000000 0.4670000000 -0.2940000000
0.0067722819 -0.2183581315 -0.8758098188
-0.3900315665 -0.2079582006 -0.9647634559
-0.3830000000 -0.2780000000 -0.1220000000
0.1230000000 0.6190000000 -0.7670000000
-0.2597407154 ...

result:

ok OK. Max delta: 0.100000

Test #23:

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

input:

10
0.000000 0.235777 0.530634 0.606656 0.893717 0.919646 0.941638 0.481056 0.559410 0.700416
0.235777 0.000000 0.591394 0.366417 0.562795 0.668466 0.673889 0.313022 0.373190 0.531931
0.530634 0.591394 0.000000 0.770613 1.067598 0.986187 0.932384 0.420644 0.877563 0.676012
0.606656 0.366417 0.770613 ...

output:

0.0033605390 -0.0004197489 -0.0104056322
-0.1914731609 -0.0678236041 0.1470544581
-0.2756235048 -0.0882263318 -0.4437834089
-0.4583215644 -0.2827733472 0.2783515828
-0.5977610047 -0.2814432585 0.5244587271
-0.7041425898 0.4460871402 0.3992269462
-0.9041385938 -0.3252734135 0.1591211782
-0.3764210416...

result:

ok OK. Max delta: 0.100000

Test #24:

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

input:

10
0.000000 0.901469 1.004974 0.822893 1.099344 0.765078 0.723063 0.160831 0.793508 0.863924
0.901469 0.000000 0.806530 0.620901 0.732184 0.887322 0.586228 1.007618 0.872765 0.806577
1.004974 0.806530 0.000000 0.726444 0.134216 0.429813 0.720199 1.033061 0.169605 0.776613
0.822893 0.620901 0.726444 ...

output:

0.0000000000 0.0000000000 0.0000000000
-0.8150288303 -0.1713626866 0.3562471777
-0.2840081300 -0.1054865868 0.9605446870
-0.5460000000 0.3760000000 0.4880000000
-0.4453680010 0.0632099247 0.9795607784
-0.1322592727 0.1781266812 0.7611996579
-0.4229595599 -0.4712367689 0.4387297610
0.0106237939 0.105...

result:

ok OK. Max delta: 0.100000

Test #25:

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

input:

10
0.000000 1.095184 1.336518 0.794425 0.718704 0.763264 0.384992 0.883098 0.631205 0.935701
1.095184 0.000000 0.505724 0.476965 0.562544 0.650190 1.020870 0.721884 0.428427 0.539934
1.336518 0.505724 0.000000 0.970641 0.940969 0.604111 1.386828 1.106682 0.675365 0.942494
0.794425 0.476965 0.970641 ...

output:

-0.0017566759 0.0016190170 0.0003905619
-0.8753223562 -0.5461871266 0.3194378614
-0.9476070816 -0.9626031195 0.0188742724
-0.6154420447 -0.1700460934 0.4878898274
-0.6640000000 -0.0680000000 0.2470000000
-0.3210000000 -0.7380000000 0.2050000000
-0.3492700435 0.3301425743 0.0806579281
-0.4495579553 -...

result:

ok OK. Max delta: 0.100000

Test #26:

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

input:

10
0.000000 1.135517 1.113155 0.997554 0.727160 0.981947 0.488711 0.763412 1.076807 0.644405
1.135517 0.000000 0.733205 0.734929 0.861199 0.513731 0.994157 0.553712 0.347820 0.602565
1.113155 0.733205 0.000000 0.801728 0.820963 1.015892 0.665360 0.726164 0.347759 0.804973
0.997554 0.734929 0.801728 ...

output:

0.0044425417 0.0075198717 0.0014931636
-0.9287646356 -0.5414125747 0.3719157271
-0.7430000000 -0.7750000000 -0.2940000000
-0.9860000000 -0.0250000000 -0.1480000000
-0.2004454116 -0.5689485404 0.1395671575
-0.7077322782 -0.2393237932 0.5481755182
-0.2131222810 -0.2899367558 -0.1320794412
-0.428125512...

result:

ok OK. Max delta: 0.100000

Test #27:

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

input:

10
0.000000 0.544278 1.089486 0.715763 0.596527 0.723484 0.423739 0.471742 0.726903 1.176242
0.544278 0.000000 1.126588 0.538243 0.972699 0.775994 0.788377 0.568696 0.530006 1.520139
1.089486 1.126588 0.000000 1.038058 1.015711 0.638127 0.817608 0.769405 0.831526 0.577701
0.715763 0.538243 1.038058 ...

output:

0.0000000000 0.0000000000 0.0000000000
-0.5365279538 -0.0835155985 0.0251204397
-0.1285179594 -0.6211585628 -0.8826574136
-0.3990000000 -0.5830000000 0.1150000000
0.4310000000 -0.1970000000 -0.2320000000
-0.1567147491 -0.0553016561 -0.6419164750
-0.0570176996 0.0454468013 -0.5146487784
-0.2770000000...

result:

ok OK. Max delta: 0.100000

Test #28:

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

input:

10
0.000000 0.832288 0.572233 0.849134 0.600857 0.620493 0.944267 1.199429 0.727190 0.217328
0.832288 0.000000 0.734687 0.455716 0.626719 0.037075 0.553344 0.651513 0.730533 0.579599
0.572233 0.734687 0.000000 1.001902 0.903210 0.646058 1.025264 0.964509 0.864814 0.633656
0.849134 0.455716 1.001902 ...

output:

-0.0002719333 -0.0000116432 -0.0000648802
-0.7981227084 -0.0899788388 0.0001178132
-0.3347262417 0.4220829093 -0.1826580507
-0.6797020626 -0.3276378308 0.3608187219
-0.3580000000 -0.4360000000 -0.3170000000
-0.6679973870 -0.1160197768 -0.0342162101
-0.8190000000 -0.4010000000 -0.3910000000
-1.000000...

result:

ok OK. Max delta: 0.100000

Test #29:

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

input:

10
0.000000 0.586822 0.745373 0.762676 1.077487 0.702889 0.309968 0.738006 0.984101 0.700294
0.586822 0.000000 0.158555 0.554726 0.474922 0.344694 0.523935 0.762669 0.463703 0.137706
0.745373 0.158555 0.000000 0.708435 0.586102 0.221952 0.662258 0.842651 0.444822 0.189350
0.762676 0.554726 0.708435 ...

output:

0.0000000000 0.0000000000 0.0000000000
-0.5933201818 -0.1434990998 0.0361768519
-0.7064889096 -0.1836906711 0.1026820601
-0.2797004220 -0.6423953906 -0.1456165258
-0.8771536352 -0.4269554464 -0.2820254757
-0.7368264608 0.0142510924 -0.1494005526
-0.1015103827 -0.2230737959 0.1905927576
-0.0280474380...

result:

ok OK. Max delta: 0.100000

Test #30:

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

input:

10
0.000000 0.791403 0.753593 0.460535 0.937848 0.744280 0.953396 0.674676 0.637909 0.604709
0.791403 0.000000 0.701957 0.506847 0.588675 0.880952 0.450810 0.284847 0.934408 0.786806
0.753593 0.701957 0.000000 0.317244 0.838216 0.584279 1.073648 0.727383 0.184555 0.999700
0.460535 0.506847 0.317244 ...

output:

0.0000000000 0.0000000000 0.0000000000
-0.8040888810 -0.0472637220 0.0110514882
-0.4437543887 0.3798820531 -0.4462223118
-0.3800000000 0.1880000000 -0.1990000000
-0.6880611239 -0.3654570381 -0.4146944556
-0.2531581917 0.0436501063 -0.7867726925
-0.7740000000 -0.5140000000 0.0440000000
-0.6288739592 ...

result:

ok OK. Max delta: 0.100000

Extra Test:

score: 0
Extra Test Passed