QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#401660#6436. Paimon PolygonqiuzxAC ✓1100ms79184kbC++205.5kb2024-04-29 08:03:102024-04-29 08:03:10

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 20636kb

input:

3
4
0 3
3 0
2 3
3 2
5
4 0
5 -5
-4 -2
1 -2
-5 -2
4
0 1
1 0
0 2
1 1

output:

17.211102550927979
36.632694762137213
0.000000000000000

result:

ok 3 numbers

Test #2:

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

input:

14
4
0 3
1 3
3 1
3 0
4
-4 0
5 3
0 -4
-1 0
5
4 4
5 0
3 3
3 2
-4 2
5
1 1
2 4
1 4
0 4
-1 1
4
4 5
-2 4
1 4
-5 -2
5
3 5
3 -1
4 -5
4 1
2 4
5
4 0
5 -5
-4 -2
1 -2
-5 -2
5
3 4
3 5
-5 -1
1 2
4 1
5
-5 -3
3 -3
-3 -3
2 -3
-4 5
5
0 1
-3 -1
-3 -3
-4 -4
-3 0
6
1 -3
-3 -3
2 -2
-3 1
-4 -5
3 -3
6
-1 -4
-3 0
0 4
-4 -3
...

output:

14.324555320336760
0.000000000000000
30.689644794435836
18.748224025700189
30.254012217852342
27.821068291826883
36.632694762137213
33.409725867074087
29.556214635433953
0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000

result:

ok 14 numbers

Test #3:

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

input:

100
6
-4 1
-1 4
1 4
-4 -1
-2 3
3 2
7
-5641417 962017
-5641417 -962017
-5719589 193284
-5693492 -578972
-5693492 578972
-5563601 1340673
-5719589 -193284
9
-25 55
58 15
-13 14
-1 19
-60 6
-17 8
11 15
16 58
16 11
10
398546 -221163
-87181 -447383
-221163 -398546
-467649 -57196
55334 -452427
-427086 -19...

output:

25.114168051655682
24824262.683584764599800
359.109758585846066
3042924.921086786780506
547.754162500889720
62188.886266667039308
34663049.530452467501163
51604481.697992786765099
2264792232.411318778991699
69911.177769532718230
6924993.002383587881923
27901.960485940569924
0.000000000000000
6886995...

result:

ok 100 numbers

Test #4:

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

input:

100
5
-1 3
-3 -1
-2 -2
-2 2
-3 1
10
12304563 85714062
39425590 -77096858
-41257504 76132260
-63303220 -59084727
-14839769 -85311687
77575790 -38474659
85621241 -12934672
55622697 66365791
83459695 -23082068
21276755 -83938086
8
2890069 4853907
-4693652 -4650419
2902770 -2219431
-3844676 8770039
5979...

output:

16.809836694575331
787989807.665995478630066
0.000000000000000
1990.271775630684715
0.000000000000000
56.625430317853045
38028.264099990847171
535.665945559041916
235257.867558373109205
180.950513806060542
602881.371128721977584
46.484916049376281
4110.465944783206396
7564262751.121731758117676
4667...

result:

ok 100 numbers

Test #5:

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

input:

100
8
11998 28379
-21628 21945
-11714 -4752
92 12641
21945 21628
-4752 11714
-30810 224
-11643 4922
4
753 -34290
34290 753
24779 -23714
-23714 -24779
5
-10003 94641
47536 82445
86918 38759
63721 -70687
8533 -1809
10
-2 -4
5 2
7 7
10 -2
9 -5
-5 10
1 -5
4 -9
5 1
7 -7
7
47999701 49571963
-18823337 -785...

output:

172915.499171505856793
189693.698725151392864
500121.888946058927104
0.000000000000000
404174872.603922367095947
0.000000000000000
7627885.172423799522221
19929200.338799312710762
0.000000000000000
383750556.971731305122375
217740941.878957629203796
54.003786735004681
469600775.601401627063751
53738...

result:

ok 100 numbers

Test #6:

score: 0
Accepted
time: 400ms
memory: 6420kb

input:

100000
8
-821105972 997119455
155098008 -782026135
999422988 -96073894
-199413884 -677661014
-198376812 -103268925
-871949583 -113805666
-870766708 -124679611
403309120 -797553920
10
-2884 -5808
-5808 2884
-4129 -698
6729 2528
-2992 2930
-2930 -2992
-3003 5746
-1081 6393
-3712 -1940
-4143 612
9
-561...

output:

6635241621.237134933471680
0.000000000000000
0.000000000000000
47255.502413963658910
22167105.492827922105789
26656.776884298458754
6358960.554756296798587
4832622736.321642875671387
400102464.605983376502991
23350.809984829720634
61.436353692862397
5471759482.636209487915039
0.000000000000000
36521...

result:

ok 100000 numbers

Test #7:

score: 0
Accepted
time: 357ms
memory: 22620kb

input:

100000
7
-84569 -1335
-84569 1335
-84485 4004
-84064 9328
-84317 6669
-84317 -6669
-84485 -4004
10
-40519 -84451
-12439 -92838
16858 -92138
-82419 -44505
67796 -64633
44505 -82419
-92138 -16858
-64633 -67796
-92838 12439
84451 -40519
5
-179830577 -368089311
-311590524 265970154
-180691219 -367667595...

output:

351672.376295571681112
609117.893083088216372
2330879690.656548976898193
0.000000000000000
2229.104078298692912
59330.556513498209824
5485547315.983452796936035
140956853.334252893924713
1784480.610534650506452
105097.148059615705279
29148820.196410104632378
588.104355504544856
0.000000000000000
67....

result:

ok 100000 numbers

Test #8:

score: 0
Accepted
time: 389ms
memory: 22656kb

input:

100000
10
-495 -4668
12809 -60550
-25228 -56515
2343 -4067
4592 972
61545 -6529
45953 -41457
4067 2343
41457 45953
4286 -1913
5
-1 1
-6 -4
-2 7
0 1
-7 0
9
424 2599
-2633 -34
-1610 2708
-2439 1994
-2485 869
-490 2587
-8431 -4475
2463 932
1540 2748
10
-61374124 55073193
-10832626 18689337
-21487249 22...

output:

314284.717111179430503
33.435849478834228
0.000000000000000
439149979.054863631725311
0.000000000000000
1742.349180776522417
3433559646.163062095642090
384890.231494063918944
762965398.387161970138550
2653519784.954759597778320
4087583.773693068884313
64069.817533092638769
4204972630.124804973602295...

result:

ok 100000 numbers

Test #9:

score: 0
Accepted
time: 329ms
memory: 22720kb

input:

10000
69
68112 24117
75386 -44718
72082 -5016
70727 -14784
71327 -11549
34769 63341
43070 58017
72235 -1730
-19413 69599
54942 -46928
22721 68591
70762 14618
8484 52702
72239 1560
69090 -21154
37138 -25834
71354 11382
65566 -30365
70023 17823
16877 -30306
-16225 70411
66944 27192
69139 20992
68056 -...

output:

0.000000000000000
0.000000000000000
0.000000000000000
1463971750.391668796539307
0.000000000000000
5926392251.286207199096680
0.000000000000000
638995324.567764997482300
0.000000000000000
0.000000000000000
431.006446842663195
0.000000000000000
0.000000000000000
0.000000000000000
587573422.2857667207...

result:

ok 10000 numbers

Test #10:

score: 0
Accepted
time: 278ms
memory: 22684kb

input:

10000
89
460198758 -887815917
-434148529 -900841304
520821786 853665430
257666304 -966233965
956851104 -290578672
986823532 -161800235
-409214522 -912438204
-726504924 -687161258
900250170 -435372979
-718495391 -695531720
-304083796 -952645288
850068309 526672451
944531956 328419525
-821343849 57043...

output:

10243692462.277269363403320
0.000000000000000
6570171297.248271942138672
7077996985.193795204162598
9410898397.305910110473633
9489932941.589427947998047
6163709528.895238876342773
9671708845.120178222656250
6634363179.909983634948730
7087210213.925821304321289
6070552363.720861434936523
9404754486....

result:

ok 10000 numbers

Test #11:

score: 0
Accepted
time: 378ms
memory: 22652kb

input:

10000
74
180466154 -86208859
862406835 506215814
935552786 353186898
999777187 -21108670
196365784 -37953641
86208859 180466154
183962356 -78471981
122294399 158253215
542361280 -840145369
988963685 148158124
791266074 -611471994
431254957 -902230105
883114186 469158113
63521397 997980477
997980477 ...

output:

5981211006.363848686218262
6062816628.611256599426270
5282468120.911982536315918
4916606482.272517204284668
5851908848.899407386779785
0.000000000000000
5836142327.353192329406738
0.000000000000000
5891667483.097363471984863
0.000000000000000
0.000000000000000
5573040287.467216491699219
5683480737.5...

result:

ok 10000 numbers

Test #12:

score: 0
Accepted
time: 393ms
memory: 22672kb

input:

1000
483
-496268 -429424
63216 653215
-248508 841108
-550897 356650
-550119 -357849
-826730 292806
-652567 69586
-633814 170195
273911 833181
-557751 345833
-471290 456697
180478 630963
-252946 -605562
-622319 -208341
-861137 166318
-852675 205340
-876801 -20919
-651085 82305
27563 876618
-522725 70...

output:

0.000000000000000
0.000000000000000
0.000000000000000
11879686.207704626023769
460290.373928032699041
0.000000000000000
0.000000000000000
2891421.524634767789394
0.000000000000000
6095598345.914844512939453
0.000000000000000
0.000000000000000
0.000000000000000
8802401426.098974227905273
4697770.6229...

result:

ok 1000 numbers

Test #13:

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

input:

1000
131
-350223990 936665979
239383029 970925211
441764873 897130869
-967985084 251007722
505110362 863054762
420125253 907466127
-776589506 -630006936
-987576231 157140662
-709986788 704214996
-22065711 999756523
-891769383 452490185
-726669234 686987499
-939493471 342566807
-978906416 204309151
3...

output:

7069732473.350299835205078
7138209250.779088973999023
10281890387.302663803100586
0.000000000000000
0.000000000000000
0.000000000000000
10222717940.222591400146484
10263109914.444307327270508
0.000000000000000
0.000000000000000
10281528585.623378753662109
7087477367.054445266723633
7134047957.917993...

result:

ok 1000 numbers

Test #14:

score: 0
Accepted
time: 452ms
memory: 22724kb

input:

1000
235
991460231 130409395
313622638 389410889
-483125428 -875551153
919512747 -393060184
997568782 -69688769
921779268 387715076
-229772984 -444076993
405359934 292717140
-208571721 -978007074
948050264 -318120568
490996298 -94459700
-253179770 -431161228
734591470 678509670
891205838 -453599111
...

output:

0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
7207037940.147850990295410
0.000000000000000
0.000000000000000
7666076521.185228347778320
0.000000000000000
7302977064.120656013488770
7221131942.050683975219727
7645676182.017143249511719
0.000000000000000
0.000000000000000
0.0...

result:

ok 1000 numbers

Test #15:

score: 0
Accepted
time: 470ms
memory: 23344kb

input:

100
9717
91016 27500
-59348 -36879
-31707 -73861
49436 81232
98144 7321
-63956 14795
-73417 -19074
-88081 -16285
-25791 -83401
91227 57975
47953 -90446
-70817 -14511
73804 -90134
-17632 -11464
7182 -57979
-33282 -50311
19595 85301
-24814 -67172
-5528 13211
44635 52594
27961 -89090
71109 -15391
17580...

output:

0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
71386189.597564548254013
0.000000000000000
0.000000000000000
75401247.266974374651909
0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
71404303.688243418931961
0.000000000000000
0.0000000...

result:

ok 100 numbers

Test #16:

score: 0
Accepted
time: 414ms
memory: 25144kb

input:

100
176
471091865 882084154
713147179 701014337
-890352156 455272488
-620765782 783996074
-592387596 805653111
486761146 873535109
-98361129 995150787
-946081685 323928147
289953885 957040618
-439928986 898032565
390595510 920562408
-423829910 905741800
-204174313 978934548
-358135160 933669753
3574...

output:

7105851504.975862503051758
10280990546.463239669799805
10280798418.894598007202148
10281888221.245098114013672
10280384358.682687759399414
10281373658.548271179199219
7139905346.506269454956055
10279388822.325038909912109
0.000000000000000
10278460756.190345764160156
10240416793.680744171142578
0.00...

result:

ok 100 numbers

Test #17:

score: 0
Accepted
time: 549ms
memory: 23260kb

input:

100
7098
-71865306 -291265133
-798257386 -602316483
-997899909 -64774781
-206612518 217511534
-703670771 -710526176
-971411529 237401857
301283615 -953534574
-49351231 -998781486
-269036995 132736941
-206332716 -217776974
-967516364 -252808398
-920939112 -389706495
-851875563 -523744236
-988866926 -...

output:

6683229061.342851638793945
6674026094.847988128662109
6681416033.052422523498535
6682682546.377049446105957
0.000000000000000
6682987238.494976043701172
6681864808.016551017761230
6682255842.858528137207031
0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
0.000000000000000
0.0...

result:

ok 100 numbers

Test #18:

score: 0
Accepted
time: 241ms
memory: 31060kb

input:

10
4039
-593515472 -804822580
-13746130 -299684908
291954058 -69013244
-979059216 -203575665
-999738014 22888955
989949562 -141420874
-915108823 -403206946
148968912 -260400198
298287653 -32007438
89853285 -286227859
-991818534 -127655774
251664674 -967814492
-184560882 -236510636
-933202631 -359350...

output:

6681347004.798403739929199
6659220064.449937820434570
0.000000000000000
7141342168.351736068725586
0.000000000000000
6682227777.609741210937500
10279237142.309623718261719
0.000000000000000
0.000000000000000
0.000000000000000

result:

ok 10 numbers

Test #19:

score: 0
Accepted
time: 217ms
memory: 25708kb

input:

10
2242
-947564084 -319565809
-248024701 -968753708
-832437517 -554118923
-249381919 -968405214
307590784 -951518738
-273725533 -961807846
347306610 -937751630
744328243 -667813946
-964815804 262926728
-862172282 -506615195
-416870938 -908965688
-962851651 -270030922
-945758049 -324871842
-933297219...

output:

8388984493.098003387451172
8414153822.351820945739746
10282636866.545078277587891
10282721178.594390869140625
7141450732.434957504272461
7141399171.132295608520508
0.000000000000000
7141353594.173233032226562
7141035278.395218849182129
7141339757.735777854919434

result:

ok 10 numbers

Test #20:

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

input:

10
43750
-545508884 -838105040
-294311431 -270888873
531862918 -846830465
306435136 -257094355
-920099201 -391685411
959735198 -280906300
372266028 -146348914
39536441 -398041292
543848949 -839183127
41936635 -397795574
536234042 -844069341
-227127089 -329261728
-170657925 -985330337
852976463 -5219...

output:

0.000000000000000
7196637126.343366622924805
7197071555.263910293579102
7187682514.612191200256348
7197620133.575519561767578
7197448259.851600646972656
7197489500.923147201538086
7197121407.398609161376953
0.000000000000000
0.000000000000000

result:

ok 10 numbers

Test #21:

score: 0
Accepted
time: 587ms
memory: 70084kb

input:

2
470540
945771735 -324831996
-610520187 792000695
115344233 993325580
237202620 971460198
597403696 801940661
979188425 202953266
935483233 353371082
955539043 294864609
-667883396 744265926
-606769585 794877771
798629875 -601822500
-272970990 962022265
990363889 -138489591
178875583 983871702
-397...

output:

0.000000000000000
0.000000000000000

result:

ok 2 numbers

Test #22:

score: 0
Accepted
time: 1100ms
memory: 79184kb

input:

2
434459
526752980 850018410
453309897 -891352982
971480538 237119303
-4478154 -999989973
89533680 995983795
-552572316 -833464958
-997436773 -71553359
-999070516 43105731
-929875231 -367875054
936485292 350706855
709414652 -704791353
893786148 -448493391
983391270 -181498235
-970976140 239176369
-8...

output:

0.000000000000000
0.000000000000000

result:

ok 2 numbers

Test #23:

score: 0
Accepted
time: 344ms
memory: 55188kb

input:

2
19821
-965236966 261376355
81055674 996709575
-125539742 272469766
246114411 171545029
-41191850 297158596
29336692 298562152
179855994 983692951
812511053 582945786
222547826 974921774
-801190057 598409971
560767794 827973116
286869774 87782305
-488362309 872640966
-2664649 299988166
187255147 23...

output:

0.000000000000000
0.000000000000000

result:

ok 2 numbers

Test #24:

score: 0
Accepted
time: 216ms
memory: 22656kb

input:

50000
8
0 -28
-9 20
-19 11
-22 4
-23 0
-22 -4
-19 -11
-9 -20
15
0 -16
8 -15
18 -12
25 -9
26 0
25 9
18 12
8 15
0 16
-8 15
-25 9
-26 0
-25 -9
-18 -12
-8 -15
7
-6 14
-9 12
-18 5
-21 0
-18 -5
-9 -12
-6 -14
15
0 -21
6 -20
13 -15
20 -9
25 0
20 9
13 15
6 20
0 21
-6 20
-13 15
-20 9
-20 -9
-13 -15
-6 -20
7
0...

output:

153.595886484744369
227.697117513458068
105.990197063481077
205.805490275554718
110.668173929174685
99.077048098902338
145.561257470408549
113.773964060301395
120.052251374222593
189.900200543749634
154.402401476229244
251.074035490542371
246.726789664138209
171.022864557452237
132.698786954205929
2...

result:

ok 50000 numbers

Test #25:

score: 0
Accepted
time: 220ms
memory: 22852kb

input:

10000
36
0 -295
26 -294
55 -283
72 -274
94 -261
111 -249
140 -228
155 -217
180 -196
207 -171
223 -150
236 -130
242 -117
245 -109
253 -84
260 -59
263 -39
266 -17
267 0
266 17
263 39
260 59
253 84
245 109
242 117
236 130
223 150
-207 -171
-180 -196
-155 -217
-140 -228
-111 -249
-94 -261
-72 -274
-55 -...

output:

1937.515999122596440
2384.276161493165546
2098.549192594299257
3227.576473077825540
2791.576659510562422
806.146569821572257
2736.170931270802157
1120.138455007100674
1564.039233168617102
1072.977982354234882
2034.109147296580431
675.877515088976679
1532.347009079179315
1152.965143178176049
556.6340...

result:

ok 10000 numbers

Test #26:

score: 0
Accepted
time: 221ms
memory: 22588kb

input:

1000
815
0 -9983
75 -9981
111 -9980
134 -9979
230 -9974
308 -9969
370 -9964
453 -9957
548 -9945
632 -9934
715 -9923
749 -9918
837 -9905
892 -9896
959 -9885
1030 -9873
1053 -9869
1098 -9861
1193 -9844
1220 -9839
1241 -9835
1309 -9822
1397 -9805
1476 -9787
1570 -9764
1669 -9739
1700 -9731
1750 -9718
1...

output:

100591.939567512468784
38481.905733447099919
66436.249086716445163
67739.823799329984467
30418.901119186906726
11512.081992937413816
61802.582616315150517
114011.890487663767999
29355.269299813444377
24826.321453865210060
123918.884358646653709
68590.684001389294281
51101.105421531436150
33094.69969...

result:

ok 1000 numbers

Test #27:

score: 0
Accepted
time: 281ms
memory: 27000kb

input:

100
4139
0 -312910
291 -312909
575 -312908
787 -312907
963 -312906
1248 -312904
1380 -312903
1631 -312901
1734 -312900
2029 -312897
2316 -312894
2475 -312892
2549 -312891
2834 -312887
2904 -312886
2969 -312885
3148 -312882
3411 -312877
3706 -312871
3901 -312867
4135 -312862
4344 -312857
4612 -312850...

output:

2161556.327707012183964
3704618.236673810053617
2417962.679176252335310
166758.223879058088642
1071878.081241393461823
265868.509010590845719
2036527.340805913787335
3348132.170881613157690
2177801.745045013725758
257047.502150936517864
1049629.858967711217701
565674.838929987396114
867475.961709183...

result:

ok 100 numbers

Test #28:

score: 0
Accepted
time: 670ms
memory: 36904kb

input:

10
82723
0 -3104553
299 -3104552
597 -3104551
892 -3104550
1186 -3104549
1475 -3104548
1761 -3104547
2044 -3104546
2324 -3104545
2598 -3104544
2871 -3104543
3142 -3104542
3412 -3104541
3674 -3104540
3934 -3104539
4193 -3104538
4451 -3104537
4708 -3104536
4964 -3104535
5218 -3104534
5471 -3104533
572...

output:

31366897.846497043967247
28364535.014438319951296
23079154.302509557455778
18245425.735387220978737
33441956.664949864149094
27695557.833168700337410
20340144.492827676236629
25553780.955341976135969
37129110.422996453940868
30518388.614918503910303

result:

ok 10 numbers

Test #29:

score: 0
Accepted
time: 816ms
memory: 72896kb

input:

2
499999
0 -62423282
1000 -62423281
1995 -62423280
2988 -62423279
3976 -62423278
4962 -62423277
5946 -62423276
6925 -62423275
7892 -62423274
8850 -62423273
9804 -62423272
10757 -62423271
11707 -62423270
12652 -62423269
13589 -62423268
14525 -62423267
15458 -62423266
16388 -62423265
17315 -62423264
1...

output:

631860469.764378666877747
440003898.228533744812012

result:

ok 2 numbers

Test #30:

score: 0
Accepted
time: 976ms
memory: 77336kb

input:

2
249999
0 -125090809
1993 -125090808
3984 -125090807
5949 -125090806
7892 -125090805
9828 -125090804
11745 -125090803
13628 -125090802
15504 -125090801
17354 -125090800
19175 -125090799
20974 -125090798
22750 -125090797
24462 -125090796
26170 -125090795
27874 -125090794
29573 -125090793
31251 -1250...

output:

872872776.551118612289429
1265323648.258659362792969

result:

ok 2 numbers