QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#787363#9808. Fragile PinballquailtyAC ✓94ms4084kbC++235.4kb2024-11-27 11:19:422024-11-27 11:19:42

Judging History

This is the latest submission verdict.

  • [2024-11-27 11:19:42]
  • Judged
  • Verdict: AC
  • Time: 94ms
  • Memory: 4084kb
  • [2024-11-27 11:19:42]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
typedef long double db;
const db inf=1e100;
const db eps=1e-10;
int sgn(db x)
{
    if(x>eps)return 1;
    if(x<-eps)return -1;
    return 0;
}
struct Point
{
    db x,y;
    explicit Point(db _x=0,db _y=0):x(_x),y(_y) {}
    Point operator + (const Point& t)const
    {
        return Point(x+t.x,y+t.y);
    }
    Point operator - (const Point& t)const
    {
        return Point(x-t.x,y-t.y);
    }
    Point operator * (const db& t)const
    {
        return Point(x*t,y*t);
    }
    Point operator / (const db& t)const
    {
        return Point(x/t,y/t);
    }
    db operator * (const Point& t)const
    {
        return x*t.y-y*t.x;
    }
    db operator ^ (const Point& t)const
    {
        return x*t.x+y*t.y;
    }
    db len()const
    {
        return sqrt(x*x+y*y);
    }
    Point norm()const
    {
        return *this/len();
    }
    void read()
    {
        int tx,ty;
        scanf("%d%d",&tx,&ty);
        x=tx,y=ty;
    }
};
struct Line
{
    Point s,v;
    Line() {}
    Line(const Point& _s,const Point& _v):s(_s),v(_v.norm()) {}
    pair<bool,Point> operator & (const Line &t)const
    {
        db c=v*t.v;
        if(sgn(c)==0)return make_pair(0,Point());
        return make_pair(1,s+v*(((t.s-s)*t.v)/c));
    }
};
int main()
{
    int n;
    scanf("%d",&n);
    vector<Point> p(n);
    for(int i=0; i<n; i++)
        p[i].read();
    vector<db> len;
    vector<Line> board;
    for(int i=0; i<n; i++)
    {
        len.push_back((p[(i+1)%n]-p[i]).len());
        board.emplace_back(p[i],p[(i+1)%n]-p[i]);
    }
    auto flip=[&](const Point& p,const Point& v)
    {
        return v*(p^v)*2-p;
    };
    vector<int> vis(n);
    vector<db> res(n+1);
    vector<tuple<Line,Point,int>> hit;
#ifdef LOCAL
    vector<vector<Point>> way(n+1);
#endif // LOCAL
    auto check=[&](Line ball,Point t)
    {
#ifdef LOCAL
        vector<Point> path;
        path.push_back(ball.s);
#endif // LOCAL
        db cur=0;
        for(auto& [_,__,i] : hit)
        {
            auto [ok,p]=ball&board[i];
            if(!ok)return;
            db r=(p-ball.s)^ball.v;
            if(sgn(r)<0)return;
            r=(p-board[i].s)^board[i].v;
            if(sgn(r)<0 || sgn(r-len[i])>0)return;
            cur+=(p-ball.s).len();
#ifdef LOCAL
            path.push_back(p);
#endif // LOCAL
            ball.s=p;
            ball.v=flip(ball.v,board[i].v).norm();
        }
        for(int i=(int)hit.size()-1; i>=0; i--)
        {
            const Line& e=get<0>(hit[i]);
            t=flip(t-e.s,e.v)+e.s;
        }
        cur+=(t-ball.s).len();
#ifdef LOCAL
        path.push_back(t);
        if(res[hit.size()]<cur)
            way[hit.size()]=move(path);
#endif // LOCAL
        res[hit.size()]=max(res[hit.size()],cur);
    };
    auto inter=[&](const vector<Line>& poly,const Line& l,Point& s)
    {
        bool ret=0;
        for(int i=0; i<n; i++)
        {
            auto [ok,p]=l&poly[i];
            if(!ok)continue;
            db r=(p-poly[i].s)^poly[i].v;
            if(sgn(r)<0 || sgn(r-len[i])>0)continue;
            if(!ret)s=p,ret=1;
            else if(sgn((p-s)^l.v)>0)s=p;
        }
        return ret;
    };
    auto solve=[&](const vector<Line>& poly,Point u,Point v)
    {
        if(sgn((u-v).len())==0)return;
        Point s,t;
        if(!inter(board,Line(v,u-v),s) || !inter(poly,Line(u,v-u),t))return;
        check(Line(s,v-u),t);
    };
    auto update=[&](const vector<Line>& poly)
    {
        for(auto& e : board)
            for(auto& f : poly)
                solve(poly,e.s,f.s);
        for(size_t i=0; i<hit.size(); i++)
        {
            for(auto& e : board)
            {
                solve(poly,e.s,get<0>(hit[i]).s);
                solve(poly,e.s,get<1>(hit[i]));
            }
            for(auto& f : poly)
            {
                solve(poly,get<0>(hit[i]).s,f.s);
                solve(poly,get<1>(hit[i]),f.s);
            }
            for(size_t j=i+1; j<hit.size(); j++)
            {
                solve(poly,get<0>(hit[i]).s,get<0>(hit[j]).s);
                solve(poly,get<0>(hit[i]).s,get<1>(hit[j]));
                solve(poly,get<1>(hit[i]),get<0>(hit[j]).s);
                solve(poly,get<1>(hit[i]),get<1>(hit[j]));
            }
        }
    };
    auto dfs=[&](const auto& self,vector<Line> poly)->void
    {
        update(poly);
        for(int i=0; i<n; i++)
        {
            if(vis[i])continue;
            vector<Line> tpoly(poly);
            const Line& e=poly[i];
            for(auto& f : tpoly)
            {
                f.s=flip(f.s-e.s,e.v)+e.s;
                f.v=flip(f.v,e.v).norm();
            }
            vis[i]=1;
            hit.emplace_back(e,poly[(i+1)%n].s,i);
            self(self,tpoly);
            hit.pop_back();
            vis[i]=0;
        }
    };
    dfs(dfs,board);
    for(int i=1; i<=n; i++)
    {
#ifdef LOCAL
        if(res[i]<res[i-1])
            way[i]=way[i-1];
#endif // LOCAL
        res[i]=max(res[i],res[i-1]);
    }
    for(int i=0; i<=n; i++)
    {
        printf("%.18Lf\n",res[i]);
#ifdef LOCAL
        for(size_t j=0; j<way[i].size(); j++)
        {
            if(j)printf(" -> ");
            printf("(%.3Lf, %.3Lf)",way[i][j].x,way[i][j].y);
        }
        printf("\n");
#endif // LOCAL
    }
    return 0;
}

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

详细

Test #1:

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

input:

3
4 0
0 3
0 -1

output:

5.000000000000000000
8.000000000000000000
8.868185038797563409
12.210024810881955830

result:

ok 4 numbers

Test #2:

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

input:

3
4 0
0 3
0 2

output:

5.000000000000000000
5.366563145999495272
6.111919138499425171
6.782203304416628317

result:

ok 4 numbers

Test #3:

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

input:

3
4 0
0 3
0 1

output:

5.000000000000000000
6.184658438426490825
7.195223542744544881
8.653439499294253405

result:

ok 4 numbers

Test #4:

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

input:

3
62 -12
-48 100
-45 -96

output:

196.022957839126588386
312.041737832760560284
326.278477718776177552
452.807123729110785393

result:

ok 4 numbers

Test #5:

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

input:

3
90 99
-76 -57
99 84

output:

227.798156269975108731
274.352306457763449571
306.891779477092103728
330.105185546433594790

result:

ok 4 numbers

Test #6:

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

input:

3
-67 22
-86 12
-81 -12

output:

36.769552621700471270
39.563975005654036167
50.916855917106008198
72.277585517450639439

result:

ok 4 numbers

Test #7:

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

input:

3
71 -48
-81 2
-83 -44

output:

160.012499511756893247
308.056794567568795001
308.056794567568795612
308.056794567568798471

result:

ok 4 numbers

Test #8:

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

input:

3
44 -44
-31 -77
8 -98

output:

81.939001702485978008
115.792668299793152550
125.606044029920128249
167.936493496979336509

result:

ok 4 numbers

Test #9:

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

input:

3
40 91
-42 90
-5 -99

output:

195.256241897666359866
378.874266791998848131
378.874266791998848380
378.874266791998848769

result:

ok 4 numbers

Test #10:

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

input:

4
-10 -97
13 -98
90 50
42 97

output:

200.848201386021876419
269.687341465334579349
382.166068040496157004
476.599262830396792900
476.599262830396792900

result:

ok 5 numbers

Test #11:

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

input:

4
39 89
-72 -94
87 -58
90 36

output:

214.032707780843626841
413.744146609923802466
413.744146609923802826
502.965718248480381680
595.018212654905458203

result:

ok 5 numbers

Test #12:

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

input:

4
-6 -90
33 -75
4 97
-36 -69

output:

187.267188797183581808
269.549444397368683918
309.208057795514970195
364.701658071570065711
395.378287554406087551

result:

ok 5 numbers

Test #13:

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

input:

4
44 81
27 81
60 -57
83 3

output:

141.890803084625608158
187.122714959936142370
251.476689548054751139
274.127656843484745930
286.319517405730431636

result:

ok 5 numbers

Test #14:

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

input:

4
96 -13
99 1
-67 -36
67 -37

output:

170.073513516949487420
183.085426249045501612
223.212103517245333523
277.379184197401987971
306.150397270400562361

result:

ok 5 numbers

Test #15:

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

input:

4
-18 -98
80 -59
73 68
-78 -62

output:

199.251097863976649169
378.325878824374495335
378.325878824374495391
512.617543811857619696
557.387457615910203335

result:

ok 5 numbers

Test #16:

score: 0
Accepted
time: 10ms
memory: 3784kb

input:

5
-90 41
-93 27
94 79
83 91
-44 94

output:

194.095337398918472829
206.355524454424886213
256.731302000890899057
337.346903462340383412
377.929160408347814604
396.662938660598424517

result:

ok 6 numbers

Test #17:

score: 0
Accepted
time: 10ms
memory: 3780kb

input:

5
78 -95
96 29
-95 34
-76 -82
64 -95

output:

215.800834104041405148
379.474351826664980714
555.074789479486291000
584.007527316151920371
640.709438394289462426
693.172491602915700870

result:

ok 6 numbers

Test #18:

score: 0
Accepted
time: 11ms
memory: 4072kb

input:

5
45 -26
38 62
-31 57
-40 -43
-13 -91

output:

161.276160668587345906
297.827772991761005938
329.103532279919254483
455.419819785876916374
496.858777460312446700
600.672113063065655214

result:

ok 6 numbers

Test #19:

score: 0
Accepted
time: 10ms
memory: 3780kb

input:

5
-28 78
-63 63
-85 30
-7 -80
61 -77

output:

187.018715640975355302
342.371973695578297209
437.283084003414150909
525.978277968785097762
704.064453641557651375
704.064453641557651375

result:

ok 6 numbers

Test #20:

score: 0
Accepted
time: 10ms
memory: 3932kb

input:

5
-20 91
-21 90
4 -99
18 -92
41 57

output:

191.509790872425110106
232.385525097110173187
282.236079299193014708
389.306701189258030998
404.075195946429088056
477.051235797513697667

result:

ok 6 numbers

Test #21:

score: 0
Accepted
time: 11ms
memory: 4068kb

input:

5
40 -91
65 75
-50 -86
-48 -87
27 -96

output:

197.853481141980415761
296.422933351981557404
328.653687667102950509
385.630036256522266580
404.176017044455335170
404.176017044455335170

result:

ok 6 numbers

Test #22:

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

input:

6
86 57
51 69
2 -52
18 -100
89 -84
87 33

output:

172.191753577225642943
341.135135135135135143
400.666074746634877868
501.268188074796617132
565.608985155262016908
622.690844361705760968
665.700571573284787530

result:

ok 7 numbers

Test #23:

score: 0
Accepted
time: 91ms
memory: 3784kb

input:

6
99 49
88 89
55 54
23 -38
18 -72
84 -63

output:

175.559106855782334836
264.079024002672979099
313.656233652890279240
390.454592258693888362
470.752012302535774946
521.830923400922022881
550.768827220738864447

result:

ok 7 numbers

Test #24:

score: 0
Accepted
time: 92ms
memory: 3788kb

input:

6
53 36
-5 100
-56 98
-79 14
-84 -24
73 -27

output:

179.627392120466971903
314.862786031766896083
385.343658453594715307
493.193630414759450559
606.181473809271697650
673.308818766480548734
673.308818766480548734

result:

ok 7 numbers

Test #25:

score: 0
Accepted
time: 93ms
memory: 3780kb

input:

6
76 84
32 100
77 -80
91 -17
95 37
86 79

output:

185.539753152794724758
211.907327945102660460
264.716755227009070767
315.062400900960845884
324.874605299655238533
356.526327351884816441
356.526327351884817385

result:

ok 7 numbers

Test #26:

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

input:

6
-35 12
-31 -22
-6 -81
96 -21
69 64
-29 65

output:

163.248277173145076968
291.515435867978080220
399.010163643813787065
496.206291028979168956
585.323790738471250450
681.215883571867487356
681.215883571867487356

result:

ok 7 numbers

Test #27:

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

input:

6
89 -75
97 1
8 95
-21 87
-23 -98
75 -87

output:

198.725941940150330214
382.902721418514523422
570.267308822347721187
699.344145373210661354
793.027042319521289604
950.401188846336390625
950.401188846336390625

result:

ok 7 numbers

Test #28:

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

input:

6
-69 88
-100 50
-100 -50
28 -25
70 26
65 90

output:

216.390850083824015648
349.424957195291762707
517.364845535935149567
604.950699399471888806
740.926805766347742199
867.573761534729373135
994.176063711636781528

result:

ok 7 numbers

Test #29:

score: 0
Accepted
time: 88ms
memory: 3936kb

input:

6
55 99
-32 6
-38 -60
89 -99
97 -98
81 73

output:

201.427406278291733374
379.481415523892918806
457.672576389815422671
590.726077870105608814
652.191527379413945709
771.740899290467341709
888.951291572580380773

result:

ok 7 numbers

Test #30:

score: 0
Accepted
time: 87ms
memory: 3780kb

input:

6
-64 25
-59 -69
23 -94
73 -88
98 20
92 89

output:

218.552053296234213162
371.496824368326204191
490.995916107724362953
639.683072892486636385
746.655933290614715392
869.842554905856346792
875.951296285140102171

result:

ok 7 numbers

Test #31:

score: 0
Accepted
time: 86ms
memory: 4064kb

input:

6
-62 -66
78 -48
99 89
73 94
-91 73
-89 -60

output:

239.885389300807563798
382.621584748225249117
560.830410535877447842
628.056180305478774062
749.571049616148084860
842.648330995755417083
933.084333761491333648

result:

ok 7 numbers

Test #32:

score: 0
Accepted
time: 91ms
memory: 4072kb

input:

6
91 49
68 88
-51 98
-95 35
-21 -72
92 -31

output:

198.305320150519411124
382.202915459764795358
500.539066260418218979
668.390333866517069028
835.277970341260956266
965.787016375946148039
1130.006060320628315963

result:

ok 7 numbers

Test #33:

score: 0
Accepted
time: 88ms
memory: 3932kb

input:

6
-49 -75
88 10
76 64
-97 46
-75 -62
-72 -67

output:

197.648678214654397914
371.898218573907400147
549.691700439943179479
696.682966717666938394
739.764248129336019655
784.403044133067559873
784.403044133067559873

result:

ok 7 numbers

Test #34:

score: 0
Accepted
time: 87ms
memory: 3808kb

input:

6
-100 90
-25 -88
85 -85
97 31
83 99
22 100

output:

254.656631564936867251
407.460694453042411300
579.314642709575580326
748.450978058450637986
833.000173773527242627
949.747074756197757261
1042.029416989733808352

result:

ok 7 numbers

Test #35:

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

input:

6
-61 98
-93 70
-98 34
-74 -94
94 -87
95 36

output:

244.167974968053498819
482.589805480785411146
586.628720030649442096
765.081070551088938569
925.800448168068360610
1083.663061989393907258
1146.063506475412568264

result:

ok 7 numbers

Test #36:

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

input:

6
-86 -4
-39 -8
-6 -9
39 -6
25 8
-64 7

output:

125.015998976131051015
127.427807997103719403
142.203492675366986953
158.035490388818071414
158.035490388818071580
158.171401604881800604
168.584662376118731009

result:

ok 7 numbers

Test #37:

score: 0
Accepted
time: 10ms
memory: 3872kb

input:

5
69 -12
69 13
-24 17
-93 -2
-55 -14

output:

162.692962355474983221
323.999999999999999944
324.000000000000000056
329.038865650544703340
329.038865650544703367
331.999189196290000470

result:

ok 6 numbers

Test #38:

score: 0
Accepted
time: 11ms
memory: 4068kb

input:

5
26 46
-20 38
-23 22
-16 -75
24 -30

output:

128.082004981183832176
203.821452147112315581
251.133813177128840541
288.823087576475459270
341.563191710891581626
389.090671752486472884

result:

ok 6 numbers

Test #39:

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

input:

6
-58 -21
-46 -25
7 -25
45 -21
47 25
-82 17

output:

132.563192478153603029
257.061493267184451250
282.815329161784540291
340.924108711198256938
415.734467087733717716
415.734467087733717716
415.734467087733717716

result:

ok 7 numbers

Test #40:

score: 0
Accepted
time: 91ms
memory: 4040kb

input:

6
19 -61
36 -24
17 76
0 93
-31 52
-3 -93

output:

186.024191975129944379
203.195561326480732295
354.195907380626131777
369.555485806916308944
396.635303666843959947
500.349135682338251763
500.349135682338251763

result:

ok 7 numbers

Test #41:

score: 0
Accepted
time: 88ms
memory: 4084kb

input:

6
33 -70
44 32
-31 68
-35 25
-31 -50
8 -63

output:

152.118374958451354095
228.854975912694544135
330.282346641011049615
431.925596947997423869
439.741714577879500403
527.333138423538638317
546.341421819224552114

result:

ok 7 numbers

Test #42:

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

input:

6
10 94
-35 45
-23 -79
31 -51
37 -40
36 20

output:

176.119277763679237717
244.082264160134511544
326.065363137960142648
427.776825379810996725
478.048055532320483485
550.232577212896163232
559.581247728870542768

result:

ok 7 numbers

Test #43:

score: 0
Accepted
time: 91ms
memory: 3908kb

input:

6
63 -31
42 46
-79 -26
-67 -31
-10 -52
8 -52

output:

142.088000900850174493
271.361751173594839048
284.291086170634113434
342.056618446413720463
427.942088219205640232
428.739918264754627519
428.739918264754627519

result:

ok 7 numbers

Test #44:

score: 0
Accepted
time: 94ms
memory: 3908kb

input:

6
4 58
-5 -64
88 -16
93 1
67 41
16 59

output:

127.314571043537667829
245.954067006266592646
306.915430542796755092
382.595057864384842344
469.278641208368548554
473.926991444092299166
473.926991444092299166

result:

ok 7 numbers

Test #45:

score: 0
Accepted
time: 91ms
memory: 3780kb

input:

6
-30 -90
7 -96
47 -35
56 -12
43 68
33 80

output:

181.298097066681866460
355.784828411940408588
357.571241396227704423
373.868815757984235437
502.972150764275923562
502.972150764275923562
502.972150764275923562

result:

ok 7 numbers

Test #46:

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

input:

6
-34 72
-47 -49
-43 -51
23 -73
95 -13
44 69

output:

155.801155323059141972
295.765192644989699189
422.425052480404360472
529.529010619029536222
660.528238394411955414
761.686572300104338007
886.232239093677604647

result:

ok 7 numbers

Test #47:

score: 0
Accepted
time: 93ms
memory: 3736kb

input:

6
87 16
60 72
-64 -64
-3 -99
30 -94
48 -82

output:

184.043473125237451324
359.345786475904363733
406.697511106830884881
521.115561033513813749
629.683616598327913327
629.683616598327913327
629.683616598327913327

result:

ok 7 numbers

Test #48:

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

input:

6
82 10
30 91
-49 73
-41 -85
57 -77
80 -22

output:

189.781453256107194336
339.863431198409203515
507.004697726373497968
598.804219118381023335
691.792748251315465169
736.135162510376507727
745.792273615026685474

result:

ok 7 numbers

Test #49:

score: 0
Accepted
time: 93ms
memory: 3784kb

input:

6
10 -88
92 -12
94 -3
70 69
-94 -20
-22 -87

output:

188.767052209859970580
367.456664111565678349
489.911829666937611139
545.447218447667263985
667.490580459397472413
669.724521187284218215
679.242678289316648699

result:

ok 7 numbers

Test #50:

score: 0
Accepted
time: 82ms
memory: 3780kb

input:

6
-5 82
-9 14
3 -92
6 -73
9 5
-1 98

output:

190.042100598788372787
190.626191347323012348
191.093643760278955976
191.093643760278965593
191.093643760278965593
191.093643760278987145
191.093643760278987201

result:

ok 7 numbers

Test #51:

score: 0
Accepted
time: 88ms
memory: 4068kb

input:

6
3 98
-19 16
-2 -99
7 -92
19 21
14 68

output:

197.063441561340849328
200.897092782856549836
214.550260357802837496
235.204733013323202123
235.204733013323202179
251.755832368839664245
251.755832368839664245

result:

ok 7 numbers

Test #52:

score: 0
Accepted
time: 88ms
memory: 3788kb

input:

6
17 80
11 92
-22 66
-23 -63
-5 -98
27 41

output:

190.672494083441411303
214.543315675785364688
292.333949074323760531
355.378463813608024280
379.549512997398331704
405.501437501944820174
405.501437501944820174

result:

ok 7 numbers

Test #53:

score: 0
Accepted
time: 93ms
memory: 4040kb

input:

6
28 25
-6 97
-29 14
-29 -14
3 -99
29 16

output:

196.206523846685587237
206.108484340342406255
215.865811286592190477
264.438671935109544886
318.852428692513981845
379.044235768146527521
420.579935062777931221

result:

ok 7 numbers

Test #54:

score: 0
Accepted
time: 87ms
memory: 3780kb

input:

6
4 99
-26 75
-15 -92
31 -60
31 61
12 95

output:

191.942699783034207484
241.174735699952486168
385.763720416335765817
417.323187295847549516
481.022951189609102945
551.685880915145374748
551.685880915145374748

result:

ok 7 numbers

Test #55:

score: 0
Accepted
time: 91ms
memory: 3868kb

input:

6
-11 -97
47 -28
39 60
-49 11
-49 -16
-19 -91

output:

164.769536019253267756
223.818775976719022885
314.977008184641491945
425.351525168055544235
459.186550661097130477
555.289044411368771792
555.289044411368771792

result:

ok 7 numbers

Test #56:

score: 0
Accepted
time: 88ms
memory: 3788kb

input:

6
18 93
-6 99
-14 -95
-5 -99
33 -74
49 0

output:

198.002525236422174268
285.155350791276694489
416.661683304230050118
490.473347372161089963
615.656789873591268170
653.344724694352457783
653.344724694352457783

result:

ok 7 numbers

Test #57:

score: 0
Accepted
time: 86ms
memory: 3932kb

input:

6
-24 58
-52 51
-79 -36
-53 -50
91 -24
96 -16

output:

176.139149538085371130
322.416479289034882710
409.003632133454121667
517.485721542874388290
626.301040753846485321
651.420569751711319606
697.645865463995716205

result:

ok 7 numbers

Test #58:

score: 0
Accepted
time: 92ms
memory: 4068kb

input:

6
11 69
-25 67
-91 -28
-4 -69
99 6
59 56

output:

193.018133863116602242
318.007206725259467195
446.787216830640322496
583.437025700868063971
669.450359328444557505
787.321218720367932531
801.955099265269331754

result:

ok 7 numbers

Test #59:

score: 0
Accepted
time: 92ms
memory: 4072kb

input:

6
-52 59
-62 54
-99 6
-91 -28
-18 -68
68 50

output:

177.101665717745297549
335.053053838958708022
390.147403067349244632
483.122664948594218892
629.101481593095822442
651.340287750049681259
651.340287750049681259

result:

ok 7 numbers

Test #60:

score: 0
Accepted
time: 92ms
memory: 3780kb

input:

6
8 -79
72 -55
94 -27
-55 66
-77 -50
-44 -71

output:

175.641680702502958042
349.237673628416000482
388.544522175244610274
504.040704430608489661
661.861823034337242611
661.861823034337242611
661.861823034337242611

result:

ok 7 numbers

Test #61:

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

input:

6
-14 98
-38 -90
-36 -91
-33 -92
89 -5
73 57

output:

190.947636801296915077
371.885120810014919768
546.271726739218390079
726.773310896570844120
726.773310896570844120
810.810256778867035843
821.837696313112705926

result:

ok 7 numbers

Test #62:

score: 0
Accepted
time: 91ms
memory: 3960kb

input:

6
-85 32
-75 -54
22 -96
47 -85
87 -22
89 -5

output:

180.277563773199464653
348.298087205093964525
513.866351180346255245
525.734650937946806692
698.981654375487899411
698.981654375487899411
698.981654375487899411

result:

ok 7 numbers

Test #63:

score: 0
Accepted
time: 93ms
memory: 4068kb

input:

6
94 -32
99 7
63 77
-94 33
-46 -88
68 -72

output:

198.919581740963853242
388.113303164616164520
531.424598932402599882
694.419504712435877003
777.104529360873238997
902.649975060520670389
953.135759357322036145

result:

ok 7 numbers

Extra Test:

score: 0
Extra Test Passed