QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#390270#8201. Komunikacja międzyplanetarnaiee100 ✓1301ms8768kbC++23916b2024-04-15 11:05:182024-04-15 11:05:19

Judging History

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

  • [2024-04-15 11:05:19]
  • 评测
  • 测评结果:100
  • 用时:1301ms
  • 内存:8768kb
  • [2024-04-15 11:05:18]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ld = long double;
constexpr int T = 100;
constexpr ld pi = acos(-1);
int main() {
	cin.tie(0)->sync_with_stdio(0);
	int n;
	cin >> n;
	vector<int> x(n), y(n);
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
	}
	vector<pair<ld, int>> z(n);
	vector<ld> ans(n);
	ld sum = 0;
	for (int i = 0; i < T; i++) {
		auto t = polar<ld>(1, 2 * pi / T * i);
		ld c = t.real(), s = t.imag();
		for (int j = 0; j < n; j++) {
			z[j] = {c * x[j] + s * y[j], j};
		}
		sort(z.begin(), z.end());
		ld S = 0;
		for (int j = 0; j < n; j++) {
			ans[z[j].second] += j * z[j].first - S;
			S += z[j].first;
		}
		S = 0;
		for (int j = n - 1; j >= 0; j--) {
			ans[z[j].second] += S - (n - 1 - j) * z[j].first;
			S += z[j].first;
		}
	}
	cout << fixed << setprecision(10);
	for (ld x : ans) {
		cout << x / T * pi / 2 << "\n";
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 0ms
memory: 4288kb

input:

2
0 0
1 0

output:

0.9996709915
0.9996709915

result:

ok 2 numbers

Test #2:

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

input:

2
0 0
0 1

output:

0.9996709915
0.9996709915

result:

ok 2 numbers

Test #3:

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

input:

2
0 0
1 1

output:

1.4144462180
1.4144462180

result:

ok 2 numbers

Test #4:

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

input:

2
-1000000 -1000000
1000000 1000000

output:

2828892.4359373418
2828892.4359373418

result:

ok 2 numbers

Test #5:

score: 0
Accepted
time: 9ms
memory: 4152kb

input:

1000
-668846 -994115
-87292 -469243
233819 706724
138756 -625022
-207607 406760
-721745 549784
27763 -604107
36977 -265414
-92076 -308153
-401165 -169081
-502432 -588666
-908426 198916
480241 -157010
-477567 538817
-249418 458036
-128857 -674040
337410 -242055
-639796 647804
-180715 -930623
259190 -...

output:

1325327741.2823134147
863127818.6443577791
1009818339.7983543841
947776625.2428949972
854117250.1874809052
1099985147.3398179184
926045542.8287202925
798867745.0681159630
808953797.8634371404
838292780.8833409486
1004894567.9175667475
1119818358.9211115069
886710504.7496174307
979597450.7266283153
8...

result:

ok 1000 numbers

Test #6:

score: 0
Accepted
time: 9ms
memory: 4220kb

input:

1000
820 -879
-758 -859
849 355
500 -105
332 -831
-330 -992
523 942
-995 620
-45 385
-661 -93
-725 -925
-750 298
49 -86
-542 19
626 -470
924 -609
-321 -416
397 -957
452 -723
-183 546
311 649
-615 608
430 -772
16 -211
-422 -94
422 99
-141 751
932 538
-932 -929
679 611
197 476
647 470
-28 4
-608 -705
...

output:

1340195.9954175930
1299435.3146604561
1122614.7536057833
883528.0197068994
1106616.2110643579
1226710.0111894986
1244148.5362807471
1320970.1511689526
834918.5372796664
963625.5255675272
1325209.7028885126
1045443.4967603801
774577.8449092912
898131.4236854584
1027936.6972626146
1263166.7489329454
8...

result:

ok 1000 numbers

Test #7:

score: 0
Accepted
time: 9ms
memory: 4224kb

input:

1000
158134 -9226
-236928 -8214
926543 3536
-407876 -2408
774955 7913
-622071 -9620
-776430 6585
-796790 2633
643978 -638
577918 8879
-443624 4269
610311 -6767
495857 -8718
-393990 -6396
-713470 3694
680418 -1807
-419187 1928
-220237 -9224
-919322 7943
-252769 9118
775229 1783
-887792 1235
-886021 1...

output:

514465867.9656529264
528362482.4007136323
931362943.0517343057
583276870.2981632866
802306351.2204866364
692790010.0285265708
799605664.2560676372
815626660.4718044270
710651700.9937745410
671746056.5189513225
598679846.0250689882
690142622.6774360313
629150280.1778062470
577911136.1219902342
752489...

result:

ok 1000 numbers

Test #8:

score: 0
Accepted
time: 9ms
memory: 4292kb

input:

1000
-2325 496972
-8887 506453
-8285 -844912
4610 -353790
-6546 -658481
-1479 -981574
9436 485750
5139 -726224
-8627 -763043
-6970 582156
-4611 -809398
-1109 559411
-7123 -773254
-407 -490804
1755 -685698
-1234 932188
6243 148933
-4847 874297
3305 73304
8589 764
-8913 -321069
932 71556
-1567 83806
8...

output:

629946065.6235930421
635376295.3388168172
831678633.7255539923
543404883.5195122897
693520572.8230187218
956490275.9613437819
624200618.8983237194
739283810.4883843275
766194577.3731223536
680671821.8678279602
802075360.9880089704
666235912.3352884461
773784728.1561359665
600266520.6794689479
711359...

result:

ok 1000 numbers

Test #9:

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

input:

1000
126205 465531
88093 259091
-126755 -904669
-128099 -911949
-128483 -914029
42493 12091
-141251 -983189
130429 488411
-69443 -594229
117085 416131
100573 326691
-30563 -383629
-49859 -488149
-93539 -724749
-101603 -768429
3133 -201109
66013 139491
215101 947051
46909 36011
-111875 -824069
74461 ...

output:

625141666.4562172641
548388851.2218842697
916587922.5682470931
923359545.5914288156
925307286.0050298040
514506415.7859361236
992512789.5160168004
636513002.1825283574
681141846.8602934683
602631624.1517993215
568255380.4785267120
581909654.0728967273
625788798.4503127065
767543484.7190070398
800722...

result:

ok 1000 numbers

Test #10:

score: 0
Accepted
time: 5ms
memory: 4160kb

input:

1000
45029 -489373
45029 -708863
45029 -382897
45029 103717
45029 724827
45029 -274553
45029 879871
45029 -700457
45029 -426795
45029 518413
45029 -295101
45029 -706995
45029 889211
45029 668787
45029 831303
45029 68225
45029 -843359
45029 967667
45029 983545
45029 -442673
45029 -999337
45029 769659...

output:

655003173.4881906697
785402696.8216438037
606490367.8648227912
514801744.1261352805
738226939.1534062763
567426532.4271526478
856325994.7767426149
779606332.5021960229
625328551.9030280786
620592862.4977060511
574182732.8484677480
784110466.1164060896
864383762.8303563953
702468375.8953181470
816272...

result:

ok 1000 numbers

Test #11:

score: 0
Accepted
time: 6ms
memory: 4356kb

input:

1000
832050 22892
755325 22892
-520697 22892
-790428 22892
737934 22892
-763489 22892
547656 22892
-562299 22892
640749 22892
96513 22892
-959564 22892
-880793 22892
84919 22892
155847 22892
771352 22892
267354 22892
154483 22892
-179697 22892
-503988 22892
-912847 22892
-374067 22892
867514 22892
9...

output:

859201925.2598658087
798695021.0951578300
627467075.0792431835
798335043.5697889153
786023539.4919255398
777446802.2397646551
664608847.1001669269
648556440.2160550000
720331731.7657959762
510104175.1747335479
946346484.5262572488
873475579.5612362612
508722897.7762535833
519002710.5177545232
810660...

result:

ok 1000 numbers

Test #12:

score: 0
Accepted
time: 9ms
memory: 4224kb

input:

1000
911092 733316
555540 66656
-688892 -66676
-466672 822204
-511116 -733336
866648 688872
-777780 -244452
-1000000 -1000000
-22232 688872
-288896 199988
-422228 -733336
733316 -377784
511096 466652
-866668 644428
-200008 -511116
22212 -422228
822204 733316
-377784 -1000000
-911112 688872
-777780 -...

output:

1325870578.7679123355
891422257.5312399904
966261389.9386166199
1162414938.9492074242
1074180343.3244138274
1272843205.8465341390
1038293368.0299341252
1507314853.6943396650
987973996.4053227977
819813063.8119129903
1040209373.2401534051
1033315386.4075694719
973174704.6464389930
1257039787.67894210...

result:

ok 1000 numbers

Test #13:

score: 0
Accepted
time: 6ms
memory: 4172kb

input:

1000
-865 401
-280 -462
-801 413
179 538
-298 -340
-5 -401
12 286
563 -417
447 -582
-856 197
-527 87
714 -490
-53 725
794 587
-968 49
-988 341
-936 925
632 -281
-141 -512
-325 -460
-963 -21
-806 983
51 576
766 538
401 820
889 77
668 -573
107 555
-792 288
-477 -783
-722 -216
409 -563
-532 -680
-64 -7...

output:

15592209.3066960017
15339906.9884412930
15554315.9406959017
15356540.8435216835
15303178.4899445533
15281189.0468281579
15253506.6703064421
15414927.6255842661
15433636.1449650596
15539228.6135159207
15339531.8206625706
15520440.9234312584
15446140.5609356472
15615703.5019656584
15605966.6854266187
...

result:

ok 1000 numbers

Test #14:

score: 0
Accepted
time: 9ms
memory: 4288kb

input:

1000
999677 -998178
998296 -999602
999946 -998492
998957 -999716
999752 -999351
998459 -999827
998303 -999064
998856 -999330
999041 -999697
999986 -998800
998664 -999751
999820 -999256
998355 -998031
999237 -999925
999849 -998996
998819 -998408
999207 -998471
998483 -998520
998279 -998784
998258 -99...

output:

34521940.0407254094
34382510.0608655861
34534147.2823364503
34263796.0568597256
34354696.1282752305
34434118.3384293336
34237319.9627041162
34094833.3365717068
34255170.9884362549
34486444.3499443020
34322260.8945841355
34376626.1537073252
34569274.5741106312
34432129.8585832361
34369647.9525947359
...

result:

ok 1000 numbers

Test #15:

score: 0
Accepted
time: 9ms
memory: 4280kb

input:

1000
953088 30365
920392 35107
923306 32712
753132 23961
682709 21947
882423 31081
455886 15339
773887 28955
864239 29022
554223 20911
495941 18600
940257 31802
756469 29713
621972 23800
833159 29260
810922 31096
149563 4763
714468 24206
781701 28562
670192 22775
271397 9929
904589 34142
833264 3119...

output:

278609907.2382056265
254211194.1725559532
256128337.2912726311
192680991.8080694108
194830857.3566799918
231366887.8396333250
280676082.7048010212
195091911.7680984645
222501165.0440393708
230239139.4964394481
257968012.7762514770
268516004.8973869032
192979539.4355368041
207297669.0319308185
209942...

result:

ok 1000 numbers

Test #16:

score: 0
Accepted
time: 9ms
memory: 4276kb

input:

1000
999970 999969
999974 999966
999976 999967
999966 999967
999957 999989
1000000 999979
999969 999962
999975 999969
999976 999995
999982 999981
999980 999993
999985 999957
999983 999993
999956 999974
999978 1000000
999970 999956
999989 999990
999960 999969
999960 999962
999985 999978
999986 999986...

output:

2848950.5566411895
2849211.3487675471
2848535.4997408162
2851186.4994897009
2856486.6089092298
2854967.4410373145
2852489.8627531308
2847877.9151873344
2851796.5249242871
2846583.7985576371
2850571.4088393508
2855071.2981632674
2850936.0770548899
2855534.8201055399
2855291.9924366619
2856264.5770650...

result:

ok 1000 numbers

Test #17:

score: 0
Accepted
time: 9ms
memory: 4188kb

input:

1000
921967 -923883
904123 -925923
937013 -923407
853860 -927337
952552 -923043
892315 -926215
813843 -928101
955445 -923574
895959 -926045
830995 -927863
931491 -924109
935147 -923342
808467 -928816
874168 -926120
858628 -926520
841908 -928086
860279 -926667
818923 -928165
829947 -927477
819611 -92...

output:

53800333.6068401122
51277161.4528350503
58343588.7547327999
63049196.8117466493
65434562.3950059828
51710634.0591007343
89034065.7412933315
66996692.5630359864
51453040.7885994031
76097186.2946531921
56415629.9293741760
57664549.2209111462
93701153.7612021693
55225987.5282054265
60888755.5696527736
...

result:

ok 1000 numbers

Test #18:

score: 0
Accepted
time: 9ms
memory: 4292kb

input:

1000
832914 -929151
812852 -930478
983008 -923577
924986 -926827
803577 -930753
857469 -928229
951191 -925686
956914 -925780
816313 -931108
892972 -926742
874794 -926573
889348 -928633
989276 -922174
872554 -928630
919664 -927236
846579 -929901
924327 -927128
949816 -926073
946645 -926983
993291 -92...

output:

75657895.4950805673
91113535.5006393546
85180045.4595848379
55048489.5303713044
99631666.9173255415
61756094.1988251709
64629425.1171726102
67553689.4819013413
88202254.9329806909
52599182.9590344801
55708693.8580762209
52997991.5154440868
90625140.8884848452
56274895.6284712195
53900938.0736367713
...

result:

ok 1000 numbers

Test #19:

score: 0
Accepted
time: 9ms
memory: 4352kb

input:

1000
838718 544665
-828937 559210
17557 999857
-874600 484829
-992485 -121819
819206 573660
-559122 -828990
87217 996250
-828995 -559113
-945430 325640
-241861 970376
-275561 961326
-559176 -828933
515047 857203
-765971 642815
999880 -17383
-882939 -469441
974475 225042
-587729 -808934
913568 406797...

output:

1279505993.4743821933
1275488047.0254795459
1277738498.6115695544
1274770205.9742467412
1258722621.0394564772
1279870979.3604033273
1264255506.2400218755
1278243968.0703757688
1259629890.2556288362
1271862849.7848286772
1276980959.8326012284
1276865920.1013576582
1264242354.2218947405
1279668146.722...

result:

ok 1000 numbers

Test #20:

score: 0
Accepted
time: 6ms
memory: 4352kb

input:

1000
-1739 569
-21653 -176
-17819 -782
15948 -1021
-4068 -274
8404 670
1216 -64
-23041 791
33333 1000000
29754 1092
-11251 -870
27777 -800
9325 -99
5648 571
3652 -661
-27682 -65
-22280 1057
27726 -355
-20537 -580
28393 1077
17828 -601
-11976 -242
-9019 -587
7035 1056
8993 -333
22316 -421
-23169 -239...

output:

20907604.4189200055
27175657.5297663043
25052119.4775654601
25148416.0855326739
20979732.5613477569
22228452.8884896030
20972647.2962895064
28089428.4426316692
1000818529.1553842878
34650756.3296237569
22365065.2187595757
32936391.0065939103
22464684.0556534233
21571854.4634733974
21239769.757234829...

result:

ok 1000 numbers

Test #21:

score: 0
Accepted
time: 9ms
memory: 4240kb

input:

1000
525 29279
-785 -17447
-367 16637
231 4435
28 -4413
765 5080
850 31810
-450 -21723
878 4842
-529 12716
687 -33065
158 -15483
820 -28181
590 -31114
-892 2723
686 12903
-920 18363
-265 -20096
-584 -15772
82 -13801
-772 -4844
-565 -18308
-66 5122
366 3226
117 -13714
-337 -4554
-740 12945
-116 10107...

output:

33480485.4813509447
25494837.7549240039
24993316.4189059477
21498644.7826792728
21592757.6173453685
21604734.9024337963
35797938.5889128115
27831463.1084306400
21586117.8698957231
23372857.6496789142
36950631.4357715858
24577608.2572771694
32537215.9576691689
35088353.4594676710
21410099.6039833441
...

result:

ok 1000 numbers

Test #22:

score: 0
Accepted
time: 9ms
memory: 4224kb

input:

1000
266654 -400006
866648 399986
599984 -533338
-200008 -733336
333320 733316
-10 -933334
199988 133322
666650 -666670
266654 533318
-800002 733316
266654 -533338
733316 599984
-1000000 -10
-66676 -533338
333320 -533338
-133342 -733336
-533338 -666670
-133342 -200008
-800002 533318
-400006 533318
4...

output:

899100398.2344297101
1173729667.0852509015
1072704346.5533079407
1036704334.4618840221
1056937813.9426443123
1160960635.1658663161
816831244.6870696768
1168579267.5807731107
938169762.9623865176
1222919719.5902196838
952223465.6767354765
1161349428.1844132039
1173266329.1513963077
918257292.35587217...

result:

ok 1000 numbers

Subtask #2:

score: 16
Accepted

Test #23:

score: 16
Accepted
time: 1296ms
memory: 8676kb

input:

100000
-885775 -107207
-303375 -24007
-885159 -107119
685578 117272
-524512 -55598
306969 63185
485735 88723
768038 129052
-232668 -13906
-794880 -94222
-590634 -65044
693222 118364
-417482 -40308
277884 59030
274881 58601
453976 84186
-417636 -40330
-464326 -47000
-187168 -7406
860753 142297
-26351...

output:

90178439517.3722095415
55149073337.0293002948
90123356793.2080185041
74169634736.6837464571
64440325511.1688746735
55146859814.1094721630
62303554099.9615140222
80246691392.9465230480
53223718736.9061060809
82471217747.2022050023
68174328457.8642274961
74704378721.5052578226
59326815698.7067042291
5...

result:

ok 100000 numbers

Test #24:

score: 0
Accepted
time: 1281ms
memory: 8644kb

input:

100000
36376 -605307
36376 -361803
36376 -330735
36376 -417921
36376 -272253
36376 -455196
36376 850512
36376 993573
36376 983382
36376 -332733
36376 -388080
36376 -582903
36376 -782505
36376 865695
36376 34131
36376 503175
36376 -165861
36376 -334512
36376 -910755
36376 421020
36376 -86217
36376 40...

output:

68556904169.9165616818
56704863392.9875657596
55617440350.1188537292
58922810399.4902814217
53832581383.0906935818
60567240691.9465897121
85863790127.9601816759
99050794506.0153323561
98044231216.8477564678
55684395809.9559149221
57703334745.3470370919
67222744412.2320705429
80871995711.0856949165
8...

result:

ok 100000 numbers

Test #25:

score: 0
Accepted
time: 1281ms
memory: 8588kb

input:

100000
-514464 12903
189314 12903
-63744 12903
762768 12903
-929870 12903
-310840 12903
742116 12903
918862 12903
6518 12903
-936638 12903
-519088 12903
-360290 12903
20490 12903
-480762 12903
759952 12903
-781784 12903
834264 12903
-737952 12903
946102 12903
811102 12903
-631536 12903
718786 12903
...

output:

63352136211.2007336952
51642001992.4473505914
50163501751.6327038519
78862196554.6402802020
93379999422.6294191107
54898445194.4634769186
77308377166.6181280315
92004080040.7364808843
49929836094.9128428400
94011779629.1848741025
63591090443.3618647642
56578244996.2220444605
49941599091.5137011260
6...

result:

ok 100000 numbers

Test #26:

score: 0
Accepted
time: 1292ms
memory: 8616kb

input:

100000
-651704 -649894
404885 406695
-335408 -333598
-561837 -560027
839108 840918
-252137 -250327
-128768 -126958
-659417 -657607
-306461 -304651
537821 539631
405330 407140
-694770 -692960
-39404 -37594
725911 727721
-200782 -198972
541236 543046
-185424 -183614
568130 569940
-833937 -832127
-8073...

output:

96820704526.2210693434
76419996332.0503573418
72224679799.1198107228
88237498291.0014930964
119131141437.3599317670
68381437357.2469939142
64724477533.2007149570
97615931576.4437762424
70766245986.9633135349
86325334075.8662240505
76448398717.6275513396
101381712156.9076747596
63586917617.9589024223...

result:

ok 100000 numbers

Test #27:

score: 0
Accepted
time: 1301ms
memory: 8612kb

input:

100000
-450675 527788
90621 -13508
-228661 305774
423254 -346141
321525 -244412
-12321 89434
-44201 121314
-334096 411209
504347 -427234
-593035 670148
57795 19318
-342634 419747
-102082 179195
-682082 759195
66199 10914
-331652 408765
295566 -218453
-289075 366188
-533955 611068
516079 -438966
-609...

output:

79331344435.0237294808
64127208976.6767369583
67485733132.6339461580
77749405046.2101679444
71731959186.1292562187
63459475211.7289194614
63587099983.9242312126
72152413695.1401137412
83727022858.9632069468
90980588010.5549458340
63731548606.5988201983
72606990375.4355584309
64233542972.5674063042
9...

result:

ok 100000 numbers

Subtask #3:

score: 20
Accepted

Test #28:

score: 20
Accepted
time: 1287ms
memory: 8556kb

input:

99999
-399458 -181627
581874 295290
262944 374533
-97710 512583
-747542 241142
-415280 -58197
-264533 -60232
-514075 618282
-575109 -881284
325419 433109
-721584 -163245
-195231 916006
925794 800281
538074 -88810
-355621 -253476
335787 -268524
706970 145682
-4992 -230653
-912127 -514886
-891369 -254...

output:

84865983503.7064022496
94784707910.6913506165
85573290791.0952691659
88384638787.3426984102
102887168413.1573368758
84172385711.1910692304
79687141961.0704990551
103817688061.9959484488
121947010682.2995878533
89163639197.0452155024
100019124035.1797352433
113665307134.0800842941
136048874159.140797...

result:

ok 99999 numbers

Test #29:

score: 0
Accepted
time: 1294ms
memory: 8596kb

input:

99999
726145 851670
-129355 953699
-829225 949023
647314 801596
-646025 711448
287211 -219158
66119 28752
562067 608557
651405 197157
-522208 292789
-12543 498561
-158046 310422
466142 713396
-335997 713465
-115521 944464
-403311 -754116
292157 -448028
-845763 -205871
747951 84012
-696143 476757
930...

output:

127378170214.4931291193
115593335983.8795234412
138983065348.8228197247
120238847473.4097875208
114538935473.7786758617
82342661482.5755286217
76777851017.0311962888
105550395318.7114771754
96712422555.0682538822
91797966673.4799545854
87368386239.6419092938
81770246804.7377950624
107211942147.06019...

result:

ok 99999 numbers

Test #30:

score: 0
Accepted
time: 1294ms
memory: 8508kb

input:

99999
107766 688453
-202531 -982043
145576 -832896
868744 -781835
-566735 452901
-20375 506578
-567462 -110882
-916585 481465
885680 623572
74519 -27165
-127815 390765
-32334 -400499
-612480 -773153
53189 -778550
-392040 -640539
-515945 -474939
-100387 -528455
-872336 -973180
559581 715506
-75789 -3...

output:

97666895452.7447391599
118523652201.9622862190
106880429577.7652704269
131146940105.2836489007
98954172387.4448811933
87857088588.8713463619
90955109267.8979192078
120804965809.0639250278
124528717909.8200190291
76745259279.4509259686
83979370648.8519440368
83465538015.4362010732
116507323436.108195...

result:

ok 99999 numbers

Test #31:

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

input:

17
-521663 -31199
770314 -87622
347278 -569065
482545 661339
-53027 559073
428240 318839
-510652 95987
-529697 -845430
265125 -445844
217652 919121
131819 -303368
207956 -946550
40559 867333
-317493 -932371
-285925 -129650
325811 690086
378956 712742

output:

14735722.4891480790
16005551.5562082904
14920414.6710764527
14915093.1368369952
13553551.9095152392
12937996.7216608105
14697759.7316974819
19744111.7152355444
13550427.8452755290
16565831.9337387110
12458681.4396886623
18682851.9357744894
16069534.2088442616
19244319.8970925286
12985438.1560471444
...

result:

ok 17 numbers

Test #32:

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

input:

137
-477999 328450
77011 -421453
-206962 -459409
741902 281356
703829 53942
297103 -631182
-187516 629468
-950660 -622694
837018 -109830
-9527 -806939
986760 -463187
939355 -978851
833589 -794295
951400 220687
-878697 187890
-99914 350101
-88324 -985565
841673 756658
-607941 -275894
-620155 198543
-...

output:

124307669.3512537673
115699065.6718132269
119329209.6502971327
141072536.1985795377
133617353.4405633484
133772080.0831141169
130020651.8068614794
173330318.8848796014
145767660.0854517848
143335902.5848861727
170618738.4270140740
201591253.2852946618
177378496.4418130394
158541591.7024140863
152868...

result:

ok 137 numbers

Test #33:

score: 0
Accepted
time: 9ms
memory: 4340kb

input:

1337
-394403 8188
-343974 -144827
646000 98427
999454 -352746
25032 -136663
-728760 -841477
-147618 865682
-383215 606795
412813 770289
-137279 -596187
506489 770924
580495 199787
-882150 -603822
-451739 782792
-646323 -541100
-512084 -114683
612404 120583
-206243 -361100
452738 -932610
-772512 -930...

output:

1085294735.6909527237
1071726908.3437662210
1277942206.5719735911
1650173974.4090344415
1014842357.6164144612
1670571917.1309012676
1467728371.5287348264
1308490077.5398138019
1471877431.0360899282
1212119778.5593402105
1516970886.6694363654
1250277876.1202382304
1622902690.3222885770
1473033519.194...

result:

ok 1337 numbers

Test #34:

score: 0
Accepted
time: 147ms
memory: 4480kb

input:

13337
-134359 36338
879808 -574148
-152748 -172247
-447784 187441
-242196 87070
616057 90372
625627 -576495
-678684 -411131
-980634 444571
-600347 -341871
-436718 -937209
-468965 750251
813471 513518
617009 -154354
-792483 -631902
-333022 707223
564469 580207
810412 -932703
540392 -782836
206135 578...

output:

10304783341.2886885693
16218032476.2213231185
10488408714.2934749443
11571825212.9672214231
10583574898.1432769718
12432698348.0008388320
14223448358.9928719448
13711385951.5023454772
16595396561.1742708404
12884991449.9621346556
16026951520.9248582125
14637228409.0987093616
15343440822.1360646226
1...

result:

ok 13337 numbers

Subtask #4:

score: 60
Accepted

Test #35:

score: 60
Accepted
time: 1294ms
memory: 8584kb

input:

100000
-963551 909577
-888800 -478750
720577 796597
898169 -573567
665807 594711
309304 -686551
-276474 232458
395778 -612170
910986 662638
634948 -416380
103786 -177204
-587878 -177709
24676 563014
933241 -633744
-371331 788755
564396 138396
442765 -71816
-352193 12179
603857 676026
-590537 18321
-...

output:

145069493259.4631341547
118715422494.4235318527
123677707786.1809480265
122922091797.7634289339
109932018349.1923029795
100672923033.3961917982
82325412063.6670543030
99104598711.8441760391
128042511978.7273752168
100941734904.8251053244
78409139761.4676088244
92893996545.6625413597
90484593007.0407...

result:

ok 100000 numbers

Test #36:

score: 0
Accepted
time: 1295ms
memory: 8556kb

input:

100000
699 -260
240 -383
-611 178
0 -636
828 -78
375 111
-398 2
-314 644
906 -549
153 109
-158 411
427 822
210 -506
-932 -380
-876 533
-655 -255
733 445
146 -617
682 -966
-475 89
-175 476
-156 -650
336 -718
499 717
-343 505
220 -705
700 -954
-962 703
901 -765
337 762
429 724
677 66
487 -201
-283 -11...

output:

100340842.9328624476
85496889.8076298410
94124371.5344481748
94169649.9136725566
106108578.3096515277
83244994.3706083854
83551435.5138505954
98587309.4210261249
122563732.6841318486
78129158.9350755346
85063446.9510636158
112540035.9889220529
89631619.2315419854
118766032.9736638722
119926725.75147...

result:

ok 100000 numbers

Test #37:

score: 0
Accepted
time: 1298ms
memory: 8612kb

input:

100000
-504880 5452
-359446 9379
374171 3180
-982149 -83
-25346 7443
900075 4832
317592 -1232
685621 593
-952872 6099
-163034 -8961
-248121 -2447
-237043 3235
423594 3840
-554143 -5202
-442764 34
792046 -4360
897444 3504
179669 -8700
-353153 1398
-41710 -796
682636 640
-447331 -429
-850923 -9140
266...

output:

62666338841.2163493037
56369086017.9033512175
57087495614.2361871861
98123193455.3760274574
49966576578.3770827614
90603832334.3781688511
55104866151.5819936469
73602080372.0137174726
95305700047.2032970935
51225461741.7380494699
52936831914.8535613455
52669289336.2039239220
59075182785.0612072125
6...

result:

ok 100000 numbers

Test #38:

score: 0
Accepted
time: 1288ms
memory: 8756kb

input:

100000
375 350046
-1432 808189
6426 -828517
8560 387017
1035 -721773
-6871 -738494
-1971 723266
-5867 -140215
-2611 156261
-7273 -949746
3587 991642
8814 414532
-427 -323859
-8394 33401
7869 842288
2497 -918901
8648 -536241
-6869 194435
4514 -97544
-8076 -548791
-9814 464175
-8486 -488713
-6947 2999...

output:

55963107152.6996150985
82361056280.9038247317
84598253603.9445938319
57329823207.7411746047
76295852934.0658054277
77533931166.8154954612
75864309268.2419478297
51065630487.9933749810
51129949905.9939083830
95385342348.3684528023
98874910826.3691946939
58421234104.8520625867
55391447249.2310060114
5...

result:

ok 100000 numbers

Test #39:

score: 0
Accepted
time: 1279ms
memory: 8744kb

input:

100000
821012 417589
402746 208456
-272506 -129170
397616 205891
-768790 -377312
-533062 -259448
-615370 -300602
-744172 -365003
-989170 -487502
611720 312943
-855526 -420680
-245434 -115634
-266380 -126107
-201538 -93686
-629470 -307652
-954766 -470300
-629176 -307505
-405244 -195539
-402424 -19412...

output:

93677970006.8150557876
64999617718.9382686391
60044393340.3800790682
64768613578.1195538901
88872405865.4398309067
71765127104.1944558173
77026635601.6878415942
86790888278.8082142100
110529912763.3003005609
76890803935.7371460646
96746586817.6311012954
59257428455.2175800316
59859100595.1609407440
...

result:

ok 100000 numbers

Test #40:

score: 0
Accepted
time: 1279ms
memory: 8592kb

input:

100000
11506 -20300
11506 696343
11506 650674
11506 -244220
11506 655462
11506 -161087
11506 83728
11506 553573
11506 493945
11506 420484
11506 -886580
11506 962755
11506 627322
11506 667033
11506 -219311
11506 -843293
11506 79633
11506 -492194
11506 966340
11506 822103
11506 169705
11506 622759
115...

output:

50126201549.7537020445
74249721291.4809665978
71194910678.8035399094
53053919714.6837263405
71505192825.7535948753
51374621481.8504271023
50477059076.6668144763
65387534179.6484894976
62281898316.4120429903
58940143521.8694795817
89328143784.1645690650
96260048776.1634487361
69712788659.9766802192
7...

result:

ok 100000 numbers

Test #41:

score: 0
Accepted
time: 1293ms
memory: 8716kb

input:

100000
-864539 9226
372817 9226
118885 9226
-322715 9226
451633 9226
627049 9226
-847469 9226
869827 9226
-225671 9226
-320387 9226
-952871 9226
107935 9226
757171 9226
422653 9226
-935975 9226
730447 9226
202123 9226
458953 9226
819685 9226
823927 9226
459733 9226
-833921 9226
26641 9226
987001 922...

output:

87393658025.8187869713
56948587164.4134600908
50732076726.0883553214
55202577297.4959618486
60179226231.0026215315
69606355320.9706695974
85929975936.1024977192
87739755327.4017609656
52541147138.7243678644
55127426290.9505491331
95428370427.4336848482
50607215783.9151040241
78595196238.9148555398
5...

result:

ok 100000 numbers

Test #42:

score: 0
Accepted
time: 1287ms
memory: 8692kb

input:

100000
107072 763280
-84880 669536
-901792 906128
-500032 -80416
839168 910592
892736 -361648
299024 -843760
745424 -933040
-977680 968624
995408 -223264
-89344 290096
214208 624896
-839296 798992
-272368 -977680
-977680 62432
526688 -290224
401696 986480
-500032 678464
-357184 -674128
-102736 70524...

output:

102163224852.3531788141
96318182082.5860512257
140721294399.3052471131
87738152158.9200047553
137413792355.8022425622
115547002452.8605185002
110460826998.6448830366
133639694614.6526844651
149503424976.4259583056
120269871058.6814888343
80691578102.5535297245
95480686474.2494108975
130393727432.014...

result:

ok 100000 numbers

Test #43:

score: 0
Accepted
time: 1286ms
memory: 8696kb

input:

100000
-612 983
-801 185
-482 -132
-248 -220
948 -305
717 -197
752 -366
286 -720
440 -623
193 39
-886 182
954 274
573 179
-261 -46
164 -236
898 -792
394 430
741 -696
579 360
839 -751
-367 -27
-416 -933
278 -803
651 526
969 -620
-672 -210
-644 506
-84 909
-438 -610
-566 -393
-570 504
633 -908
-586 46...

output:

144817998.4702519314
119526682.1316998695
101465992.8203114714
95323119.1395286747
131929508.1992923013
114212678.6553038613
120037661.7904995556
116011753.1365380747
115101141.8109891034
92239322.8215336181
125368705.0880436060
131853470.8483421595
106190339.6058657973
93625989.0340075082
94095861....

result:

ok 100000 numbers

Test #44:

score: 0
Accepted
time: 1291ms
memory: 8692kb

input:

100000
998017 -999538
998753 -998776
998388 -998793
998774 -998864
998514 -999116
998365 -999411
999432 -998301
999631 -999559
999894 -998402
998146 -999128
998387 -999396
999096 -999964
998491 -998749
999658 -998362
998750 -999952
999189 -998223
998576 -998181
999905 -999946
999777 -999516
998713 -...

output:

155558932.3539174874
109433700.0759294761
122568026.7276267283
107587726.6415147020
115321272.9051974583
128697950.8640523214
133274982.5336195233
134242760.3593364353
151990456.7169039938
136261490.9313200181
127074648.2252166472
143939227.9294907679
118505192.0510706931
139680363.9660455731
144981...

result:

ok 100000 numbers

Test #45:

score: 0
Accepted
time: 1282ms
memory: 8600kb

input:

100000
948520 63772
478676 31122
547527 39431
948595 74038
933820 59849
867589 60649
383955 28463
537211 37487
185865 12421
862851 63496
552678 38572
875201 64569
530612 38931
375979 26970
717105 50039
727465 50364
313430 22663
757160 50531
820444 63019
917317 61537
676302 47601
859926 63404
841729 ...

output:

28885287814.1108184177
26137728409.3127431609
22895409797.5309540555
28979619360.1258117277
27754286842.2812959403
23605384303.8985342346
32047434094.4705270417
23317085093.9017371163
48519844149.7090109102
23384754819.4874752760
22698073574.8320962191
24023401561.4269373287
23592481817.7259836476
3...

result:

ok 100000 numbers

Test #46:

score: 0
Accepted
time: 1284ms
memory: 8716kb

input:

100000
999928 999612
999895 999685
999795 999930
999920 999607
999692 999848
999715 999661
999850 999977
999877 999775
999806 999829
999738 999965
999625 999732
999825 999646
999578 999683
999875 999798
999621 999847
999562 999899
999789 999573
999857 999778
999653 999891
999635 999827
999606 999650...

output:

29161464.5323088823
24245353.9089304250
24551768.9721635343
29049756.2481055228
22325294.5150512992
23283398.9325224477
28482707.2346518028
21926376.0189193576
20659420.6583092923
26985700.5300288378
24773249.4623098381
23715880.3283900067
28951278.3693020028
21932530.6948012243
25515529.9987826843
...

result:

ok 100000 numbers

Test #47:

score: 0
Accepted
time: 1291ms
memory: 8680kb

input:

100000
974045 -845056
912376 -848917
833573 -855043
941363 -847580
986054 -842700
814512 -857990
811602 -858282
887547 -851127
827978 -855011
882150 -851856
917480 -849818
822787 -856918
840494 -855359
846001 -854904
957169 -845333
871102 -853381
840718 -855110
879321 -851539
959498 -846860
856121 -...

output:

7759832512.0795579841
5100232650.3805120471
7241939965.4079880575
5871984993.1148201255
8733738051.4542379435
8703454705.1342892861
8957692287.4194606012
5106265385.4458168447
7629194276.4271082366
5188941546.9187820135
5174580016.6628152728
8024658591.2448288221
6808764016.0392290023
6494805262.938...

result:

ok 100000 numbers

Test #48:

score: 0
Accepted
time: 1272ms
memory: 8572kb

input:

100000
848346 -855026
966360 -848492
866031 -858975
901189 -855204
818005 -858675
884973 -856189
971684 -848128
888494 -853861
973136 -846398
937561 -849333
937505 -853131
867470 -858148
881925 -855995
808010 -859461
831708 -857641
856262 -855301
967352 -845515
824765 -863576
951293 -848411
997045 -...

output:

6396212062.9860757445
7222994788.3290591664
5640723711.7316461224
5038806740.8166933642
8413046766.7933542323
5156832075.2550671296
7590214494.9905281924
5109144750.5313685266
7713156501.6809601784
5745286059.4417615309
5729637338.2224575849
5585596640.0594645394
5207330175.1092356751
9280740611.475...

result:

ok 100000 numbers

Test #49:

score: 0
Accepted
time: 1296ms
memory: 8592kb

input:

100000
-743127 -669036
-87152 -996168
-961205 275698
-544630 838711
-173589 -984775
788090 615757
-544531 -838668
883030 469551
970321 242027
906314 -422578
629391 -777079
987783 -156383
292428 -956258
241936 -970229
-945451 325595
961320 275739
933646 358431
-874607 -484708
-325477 945525
601903 79...

output:

127171321966.3015724272
127148930456.5935771167
127351864146.8308644518
127425226253.7027279139
127140568216.0974334329
127467343707.2703137919
127150596331.7135665491
127478705940.2604179680
127490110437.9423903674
127340905011.6026327014
127194840683.2748241723
127454784065.2556390166
127142356386...

result:

ok 100000 numbers

Test #50:

score: 0
Accepted
time: 1281ms
memory: 8768kb

input:

100000
-10324 279
-11954 -473
26042 -380
-3622 -54
-30396 -707
-10377 664
22232 -93
2589 -945
-3216 751
-28592 902
-32914 -674
10991 603
5141 224
-13136 -327
5389 43
-651 560
-18440 158
30805 600
-10379 797
9261 421
-18633 913
-15020 -1035
-17348 200
17388 483
7148 -47
21494 -506
7400 -973
-29631 11...

output:

1836537719.1604353702
1892723469.5803715060
2679277518.1823688082
1693245425.0413021244
3072696571.8863159565
1840383428.0524157906
2402699431.7534438395
1685080941.3079217257
1692178869.2085853489
2914338870.4814289277
3310844762.5025059069
1848682181.2376739813
1708274368.0369361871
1937132571.022...

result:

ok 100000 numbers

Test #51:

score: 0
Accepted
time: 1288ms
memory: 8692kb

input:

100000
155 32050
294 -29925
6 -28723
-513 -27637
-140 -15324
15 3637
606 25914
-298 -4009
888 -33184
1076 -31067
453 -30486
1016 5733
-523 -378
461 -6897
-741 -32001
518 1557
-47 -12932
1081 10181
973 -30171
-785 -5279
-359 -19005
1069 31498
819 4143
202 28863
91 -18152
-1108 -21689
202 6526
616 -58...

output:

3220736097.8953724075
3009527045.0953036593
2903433751.1135071153
2813049871.9921811498
2021042918.2691838795
1693755343.6286986368
2689545857.9925473817
1695569183.8620792367
3319928758.9029844522
3118869857.8261084340
3060867670.6105028880
1730198378.0317179902
1673988126.4455157083
1742954688.024...

result:

ok 100000 numbers

Test #52:

score: 0
Accepted
time: 1286ms
memory: 8644kb

input:

100000
-649483 343165
-662166 337868
-612381 397532
-622211 353880
-624799 393100
-633920 346744
-640636 381834
-622085 346963
-619648 396621
-626406 338080
-606178 352966
-615729 374554
-651978 399094
-661348 381013
-648849 358714
-663479 382582
-602194 339896
-606742 378640
-635063 387238
-609791 ...

output:

4505150513.8444507676
5454383480.9564547301
5190989090.6391686271
3853225006.4288234848
4493530430.2603096352
3995136298.3222212237
3883836539.3261603813
4133108658.5329556600
4858930804.0079515744
4564911595.1325592152
4630418213.7363686282
3978313731.0565743065
5224240928.5859292797
4754521306.830...

result:

ok 100000 numbers

Test #53:

score: 0
Accepted
time: 1288ms
memory: 8584kb

input:

100000
-282 -235
-263 -248
19 69
-181 -281
16 -35
241 -15
-267 -280
-130 -166
36 145
98 -161
278 222
-19 -144
-95 -282
-117 78
186 147
-252 -92
-240 -133
53 -258
-235 157
122 -155
192 -81
60 -298
80 20
239 -219
-241 169
-166 267
161 -177
-143 -216
-75 -115
129 195
-98 231
-2 7
147 248
-269 111
154 8...

output:

706118658.9763657634
705627965.8472704246
689196587.1416853105
703440868.9446339035
688691272.7799040470
696692476.7652201484
707819438.8629828957
694743592.3981350364
691639530.5825733741
693509748.1525463457
705093902.0935104971
691528168.6533811475
700684051.0843290041
691292753.8006292813
696253...

result:

ok 100000 numbers

Extra Test:

score: 0
Extra Test Passed