QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#151179#6124. King Of ZombiesSommohito#WA 1620ms12068kbC++202.8kb2023-08-26 15:46:502023-08-26 15:46:51

Judging History

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

  • [2023-08-26 15:46:51]
  • 评测
  • 测评结果:WA
  • 用时:1620ms
  • 内存:12068kb
  • [2023-08-26 15:46:50]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
#ifdef APURBA
#include "DEBUG_TEMPLATE.h"
#else
#define HERE
#define debug(args...)
#endif
#define ALL(x) x.begin(),x.end()
const int N=1e3+5;
int n,D;
int x[N],y[N],vx[N],vy[N];
bool done[N];

pair<ld,ld> getpos(int who, ld tm)
{
    ld X=x[who]+vx[who]*tm;
    ld Y=y[who]+vy[who]*tm;
    return make_pair(X,Y);
}
ld getdist(pair<ld,ld> A, pair<ld,ld> B)
{
    A.first-=B.first;
    A.second-=B.second;

    return sqrtl(A.first*A.first+A.second*A.second);
}

ld get(int a,int b,ld after)
{
    ld low=after,high=1e6;
    ld ans=1e6;

    int cnt=200;
    while(cnt--)
    {
        if(low+1e-18>=high) break;

        ld mid1=low+(high-low)/3,mid2=high-(high-low)/3;

        pair<ld,ld> posa=getpos(a,mid1);
        pair<ld,ld> posb=getpos(b,mid1);
        ld dist1=getdist(posa,posb);

        posa=getpos(a,mid2);
        posb=getpos(b,mid2);
        ld dist2=getdist(posa,posb);
//        debug(dist1,dist2,mid1,mid2);

        ans=min({ans,dist1,dist2});

        if(dist1<dist2)
        {
            high=mid2;
        }
        else
        {
            low=mid1;
        }
    }
//    debug(ans,low,high);
//    if(ans-1e-18>D)
//        return 1e6;

    low=after;
    ans=1e6;
    cnt=500;
    while(cnt--)
    {
        if(low+1e-18>=high) break;

        ld mid=(low+high)/2;
        pair<ld,ld> posa=getpos(a,mid);
        pair<ld,ld> posb=getpos(b,mid);
        ld dist=getdist(posa,posb);
//        debug(dist);
        if(dist<=D+1e-18)
        {
            ans=mid;
            high=mid;
        }
        else
            low=mid;
    }
//    debug(a,b,after,ans);
    return ans;
}

ld ans[N];

void TEST_CASES()
{
    cin>>n>>D;
    for(int i=0;i<=n;i++)
        cin>>x[i]>>y[i]>>vx[i]>>vy[i];
    priority_queue<pair<ld,int>>pq;
    pq.push({0.,0});
    for(int i=1;i<=n;i++)
        ans[i]=1e6;
    while(!pq.empty())
    {
        int z=pq.top().second;
        ld tm=-pq.top().first;

        pq.pop();
        if(done[z])
            continue;
        done[z]=true;
        ans[z]=tm;

        for(int i=0;i<=n;i++)
        {
            if(done[i]) continue;
            ld when=get(z,i,tm);
            if(when==1e6) continue;
            pq.push({-when,i});
        }
    }
    for(int i=1;i<=n;i++)
    {
        if(ans[i]==1e6) cout<<"-1\n";
        else
            cout<<fixed<<setprecision(9)<<ans[i]<<"\n";
    }
}


/*
*/

int32_t main()
{
#ifndef APURBA
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
#endif
    //freopen("input.txt","r",stdin);
    //freopen("out1.txt","w",stdout);
    int t=1;
    //cin>>t;
    while(t--)
    {
        TEST_CASES();
    }
    return 0;
}

詳細信息

Test #1:

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

input:

5 3
0 0 3 0
10 10 0 -3
1 1 -1 -1
16 1 -1 0
100 100 100 100
-100 -3 10 0

output:

2.626226552
0.000000000
3.000000000
-1
14.285714281

result:

ok 5 numbers

Test #2:

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

input:

4 10
0 0 0 0
10 0 0 0
20 0 0 0
30 0 0 0
41 0 0 0

output:

0.000000000
0.000000000
0.000000000
-1

result:

ok 4 numbers

Test #3:

score: 0
Accepted
time: 962ms
memory: 5152kb

input:

814 5261
8674 -10000 83 9959
-3135 4963 -5450 -980
-6718 -5021 -5412 1206
8906 -9471 -4357 5471
-3795 2180 -4645 -2664
9110 -5528 9221 -3130
-3916 1465 -6825 5446
1767 -3479 -6871 -7960
-3523 5303 -1141 7806
3362 -3357 7529 -6106
-7323 -8776 3458 3288
-4825 -5940 -4857 95
-3169 6767 -3056 -2340
3228...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 814 numbers

Test #4:

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

input:

470 235
5883 -1751 1075 368
7790 2418 3758 -3846
-5164 -3433 -5837 -7492
-3987 -6763 6899 -9252
-7032 2446 -4829 6204
5952 -1391 -6466 -1366
1902 -976 -6563 3105
-726 2931 4726 5388
5891 -2901 -3071 906
1237 6576 -2018 1582
-4444 -974 -537 -7998
-5090 -3067 -6005 -6746
7139 -9713 -6108 5218
150 -569...

output:

-1
-1
-1
-1
-1
-1
-1
3.877603542
-1
-1
-1
-1
-1
1.867234024
9.484386252
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0.469299226
1.276014665
-1
-1
-1
-1
0.851914471
0.840061286
-1
-1
-1
2.049598178
-1
-1
-1
16.633857975
1.130837547
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
0.775...

result:

ok 470 numbers

Test #5:

score: 0
Accepted
time: 367ms
memory: 4100kb

input:

513 6743
672 -7437 -673 -4800
2473 7996 -6326 3500
5785 -4490 8411 9527
-6418 -4031 -7778 -7792
9650 -8109 -6418 4041
-6638 9373 7042 1792
-2582 601 2410 8495
7222 1876 -8251 1827
-6668 3503 4439 -2064
1004 6600 4235 -5489
-995 77 4672 7871
-2757 -6231 3455 2819
-1903 -7115 -7370 -9396
-9766 -581 -7...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 513 numbers

Test #6:

score: 0
Accepted
time: 395ms
memory: 3752kb

input:

532 1356
592 8158 1209 4121
8684 -404 6292 -1509
-5665 9852 -8564 -4450
-225 -791 -3099 -5575
-3121 8560 5045 6229
-5053 3552 -871 1805
3034 3522 -1398 7523
-6851 -6621 -5539 5163
561 4300 -7900 -6939
64 -7900 4459 -3273
-4009 -5022 -9559 2288
1829 -7181 -4184 3853
5126 4300 2628 1409
5769 -2768 548...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 532 numbers

Test #7:

score: 0
Accepted
time: 525ms
memory: 3636kb

input:

643 343
-6247 451 4007 656
3579 -2469 720 -1888
-2485 4858 -9720 3473
-8864 9702 -2158 5692
-9764 6779 5532 9028
9723 -3172 7666 -3027
-4979 1933 2796 -3016
-6078 -4470 -211 4094
-5796 -7180 -8344 -4196
-1820 1461 8832 -3253
-848 3229 -678 5283
-5949 3456 3712 -4297
9845 7690 9994 -6191
-4871 -2949 ...

output:

1.683400805
-1
-1
-1
-1
0.787816175
0.552551667
-1
-1
-1
0.397902356
-1
2.438182635
1.489032943
7.670866680
3.016198543
-1
-1
-1
7.595202566
-1
3.476895644
-1
1.114923342
1.228546641
-1
0.745721503
-1
-1
-1
-1
-1
4.084961068
1.305500171
-1
-1
-1
0.701474042
3.224101237
-1
-1
-1
-1
4.573938518
-1
-1
...

result:

ok 643 numbers

Test #8:

score: 0
Accepted
time: 594ms
memory: 3752kb

input:

649 3052
1634 -9666 -5898 2948
-3830 8114 -1787 -3584
-4100 -5438 8239 -9293
9908 -3521 -633 -3613
-7653 -5639 -7483 6603
1242 2634 2971 598
9456 6152 -1814 6843
-4929 8914 1158 5029
-3091 4248 140 -895
9284 -6769 -9699 -9594
-2824 6832 4073 -8505
4594 3404 -1270 -5966
9563 -1447 -4108 4073
-3025 -2...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 649 numbers

Test #9:

score: 0
Accepted
time: 1067ms
memory: 5092kb

input:

870 5514
-1985 -9924 -5613 -9347
3241 -128 -5784 33
-4825 -572 -1340 2283
4080 -3302 5218 4158
-1317 -3620 7471 1536
-1154 6167 3855 8688
-3304 -1866 4963 3167
-8053 3553 3507 7352
5065 3337 319 -5145
7448 -8719 9929 7044
-6110 -612 7888 882
-3818 3492 7954 -6249
-3942 -5128 -8938 5992
3112 -122 79 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 870 numbers

Test #10:

score: 0
Accepted
time: 1123ms
memory: 5124kb

input:

886 5788
4869 805 -1826 8306
2185 3157 -4632 7777
5595 -5345 6978 -9690
2367 3972 -9402 726
5510 -8129 -1422 -4013
4131 7664 -8198 -2791
9043 -2491 8462 -1914
-6524 4703 4495 -8856
5351 -7212 2052 -3286
-2623 6477 8934 -1888
9084 1877 -625 -9152
7860 -5086 -4514 7105
-4796 -7466 -8809 -52
7692 6702 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 886 numbers

Test #11:

score: 0
Accepted
time: 140ms
memory: 3744kb

input:

314 5962
2258 -8497 -2386 5236
-428 6368 5126 9422
-3688 -8063 -4141 -4815
-853 199 -2565 -3687
534 -5684 2036 -1824
7442 -4207 8410 4896
2641 3361 -8534 9797
-9026 7734 -6819 7914
460 3684 6187 6603
7444 -4285 -3281 1650
7287 -1985 2698 3794
-6447 2709 9001 3869
-6024 2374 8468 -2719
-6641 6761 763...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 314 numbers

Test #12:

score: 0
Accepted
time: 971ms
memory: 5280kb

input:

821 5983
-8357 -5982 567 -3431
27 3101 -1648 1733
-3386 2420 -9294 -3877
-8981 -7706 -1073 5824
-6539 -53 3538 -5322
-9740 6341 9302 -4074
7003 8101 7115 7103
-2801 1876 5693 -6039
6032 -9161 693 -2299
8895 -3560 -7514 1319
-8687 -4261 -906 7503
-9920 -3828 1091 4014
-4722 -723 3200 5898
-917 7491 -...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 821 numbers

Test #13:

score: 0
Accepted
time: 1424ms
memory: 5148kb

input:

1000 4747
4970 8674 -10000 83
9959 -3135 4963 -5450
-980 -6718 -5021 -5412
1206 8906 -9471 -4357
5471 -3795 2180 -4645
-2664 9110 -5528 9221
-3130 -3916 1465 -6825
5446 1767 -3479 -6871
-7960 -3523 5303 -1141
7806 3362 -3357 7529
-6106 -7323 -8776 3458
3288 -4825 -5940 -4857
95 -3169 6767 -3056
-234...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #14:

score: 0
Accepted
time: 1403ms
memory: 11628kb

input:

1000 8968
-5350 7923 2783 3409
1219 2941 9187 -7428
9803 -8286 3099 -7049
-7487 -1266 3521 9843
-530 237 -6361 5701
-8580 -5161 -9458 -8646
6689 1331 3081 -3533
-4386 -7013 -4636 -5818
-68 -2663 4856 8768
1285 -9886 -8423 -866
7154 -1491 -81 7373
-3102 -3032 2902 5216
-1331 -226 3158 -19
1920 6649 5...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #15:

score: 0
Accepted
time: 1418ms
memory: 5172kb

input:

1000 3685
-7383 -377 -2723 3029
-2493 -2981 -8929 1564
101 -4088 2025 4793
-6663 8915 8708 4058
-6426 1405 -8811 -9888
437 -7050 -2828 -8785
-8980 -2683 9334 1620
-3768 1498 2041 9569
-953 -4807 -250 -7601
-5737 -1586 5466 639
-62 3533 -9375 1745
1643 -8798 -7217 2473
-7954 -8314 4197 5161
407 -2869...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #16:

score: 0
Accepted
time: 1397ms
memory: 7436kb

input:

1000 7779
-83 -6062 6465 -619
3622 -535 -1561 -1436
1194 3524 2198 7756
-2565 -4391 4086 -5079
2187 526 8346 -3379
-9014 -1634 3024 5216
8525 8864 8021 -926
-4295 6866 2809 -6692
8830 -6286 -8592 5530
5988 -2345 8435 -670
428 304 8957 -6518
4010 -1230 4299 -3378
-247 6367 -2639 -3858
-2449 1072 5871...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #17:

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

input:

1000 367
7870 -167 -2515 -6975
2856 -2621 7937 1386
-1908 -3582 1236 6091
-3505 9712 3761 9548
-8143 2480 -8749 3137
1848 4624 -2542 9255
8798 3005 3288 -8920
-3029 -9267 9804 1357
9924 8377 -9639 -4839
-9852 -6986 -4299 2542
-9713 -1865 -6012 5169
-9116 -9545 731 -4041
-7303 -8748 9843 -1061
-5474 ...

output:

0.272358333
1.067484324
-1
-1
-1
0.244044404
0.639877561
0.630189420
-1
-1
3.666345514
1.018151437
1.005672004
1.764088148
1.673318110
1.166337779
-1
-1
0.478156795
4.691097858
0.370838036
-1
0.538546266
7.653033809
0.324222659
-1
-1
1.048746174
11.364426986
-1
0.244044404
-1
-1
0.914960559
-1
0.082...

result:

ok 1000 numbers

Test #18:

score: 0
Accepted
time: 1447ms
memory: 9196kb

input:

1000 7034
4796 -4472 9218 -4549
-8447 -6070 4486 168
9889 4756 4961 -6819
7730 3619 538 2306
2134 -9296 -9397 -1779
2756 72 -3697 -2728
-8010 3791 -1544 -6409
5577 -5291 -8365 -5618
3114 -9044 3997 8424
-6076 -2538 6710 -8953
-2332 1907 6611 -8185
5142 6983 -957 -6253
-8247 4249 5737 8200
3705 -2355...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #19:

score: 0
Accepted
time: 1423ms
memory: 4076kb

input:

1000 3023
653 3503 -8597 7046
7204 -6088 -2291 -5222
-5367 4811 4332 768
9436 3555 -3480 4777
-8209 -1414 -1487 2744
5093 -6803 3023 5993
1357 -2792 -3676 3429
9407 -7077 6722 -8023
-6578 1699 -6241 3434
1519 -3912 -5650 6434
9334 -5579 4875 -4502
-2540 5304 1263 8120
9429 2863 5168 4897
-1830 1559 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #20:

score: 0
Accepted
time: 1425ms
memory: 8208kb

input:

1000 7257
1012 6701 3271 9093
-1083 -7424 -8075 -6841
-6820 2317 -2694 -6065
791 6786 -6516 -3387
-35 713 4141 -6414
-2609 9656 -4591 799
7198 -7782 9355 6170
-8823 412 -3040 6438
5522 7109 -3607 7935
-7045 596 -4807 6775
-6931 -1513 600 -2114
-1142 5879 -2429 -2857
8513 2683 -6198 -5797
-9347 1129 ...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #21:

score: 0
Accepted
time: 1376ms
memory: 12068kb

input:

1000 9114
1476 -4037 -8995 8262
8908 -1487 944 -5516
9596 3650 834 1070
7465 -3222 2414 2288
-2668 -8938 -4207 6003
6021 4793 -8241 -6545
-9553 6783 4946 -2850
-3838 -5766 -1767 -2851
-4477 -4400 -148 -861
1862 -2576 -5312 -9308
-7990 4073 -6799 -1084
204 6189 676 -6653
-322 4373 -5598 1673
3104 -52...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #22:

score: 0
Accepted
time: 1406ms
memory: 4184kb

input:

1000 1913
-2750 -6291 96 1178
1797 3051 -8940 -1995
8432 -2557 -8851 -5582
-7893 -8622 4210 -7213
9625 -446 -8443 -9850
-8938 -5388 -3843 320
1104 -5252 4319 9847
2861 -6366 7847 2754
-3371 -6987 1440 -3714
-8810 275 -1932 -5294
6323 4901 -9319 -6060
-9482 4308 -3820 2761
-7791 72 -7568 2794
-9896 1...

output:

0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
0.000000000
...

result:

ok 1000 numbers

Test #23:

score: 0
Accepted
time: 1086ms
memory: 3752kb

input:

814 7
-89 23 -61 5
39 94 -77 22
-46 97 72 -30
80 72 -31 -55
27 17 44 33
-22 79 -4 71
29 -32 24 1
-87 61 -46 -7
23 20 92 9
41 51 -70 -58
9 -40 65 87
-46 51 -72 44
-34 -49 100 27
-39 -61 7 22
-53 9 -5 87
10 -9 -82 -47
-6 59 -20 -1
-16 28 -81 32
87 68 -3 -5
-62 57 69 -67
76 16 51 62
42 38 97 98
-1 16 -...

output:

0.135023214
0.082415537
0.145334333
0.052521957
0.082415537
0.092594384
0.042001957
0.052521957
0.153041600
0.095008147
0.064517977
0.063743705
0.159779137
0.020876370
0.018399515
0.056194488
0.004583071
0.274157607
0.042001957
0.113503144
0.062736071
0.018399515
0.092594384
0.103432841
0.169922077
...

result:

ok 814 numbers

Test #24:

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

input:

470 6
-45 73 -59 -16
-76 3 47 81
-4 77 37 -49
18 50 -25 96
30 70 91 -66
-54 40 -13 50
66 59 -20 6
-75 -60 40 18
53 -18 -11 -93
1 66 31 -50
74 -47 -33 -30
-80 80 -62 -71
44 49 -21 -50
63 46 7 -24
50 21 -70 -43
-98 65 -26 -22
56 37 73 -77
-47 55 70 -46
49 27 78 -61
29 99 -70 61
-61 44 -75 10
-85 -61 -...

output:

0.375518676
1.668319032
0.543975498
-1
2.230423076
1.153055575
1.125995905
-1
1.547560035
4.406955466
-1
0.966676582
-1
1.077481413
0.977680366
-1
-1
-1
0.494031667
3.015476834
2.629382503
1.590737264
-1
-1
0.638659020
-1
0.099063963
-1
-1
-1
1.830860051
-1
-1
0.073996618
-1
0.829219940
-1
0.6574620...

result:

ok 470 numbers

Test #25:

score: -100
Wrong Answer
time: 381ms
memory: 3944kb

input:

513 10
-21 18 -43 84
-74 -32 -68 -82
16 -98 -70 -10
98 -83 -38 -55
-85 -57 41 51
-41 -80 -50 -98
-92 -11 49 -64
16 91 53 -18
-50 86 14 -39
-76 42 -58 -26
37 -82 -20 -49
45 -81 -97 2
-22 -83 -32 84
98 -77 49 30
98 36 -45 92
-54 -90 18 -87
27 15 49 -63
-54 -67 -7 -59
-55 46 -36 91
-25 -63 31 90
7 9 -5...

output:

0.036668666
0.017228668
0.018695831
0.036668666
0.036333841
0.036668666
0.000000000
0.089383997
0.004236833
0.000000000
0.000000000
0.017228668
0.018695831
0.029993915
0.028812741
0.000000000
0.036668666
0.000000000
0.017228668
0.000000000
0.029993915
0.036668666
0.036333841
0.000000000
0.018695831
...

result:

wrong answer 14th numbers differ - expected: '0.0276413', found: '0.0299939', error = '0.0023526'