QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#275097#7903. Computational Intelligenceucup-team1209AC ✓1413ms4232kbC++201.6kb2023-12-04 13:23:022023-12-04 13:23:03

Judging History

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

  • [2023-12-04 13:23:03]
  • 评测
  • 测评结果:AC
  • 用时:1413ms
  • 内存:4232kb
  • [2023-12-04 13:23:02]
  • 提交

answer

#include<random>
#include<iostream>
#include<complex>
#include<cmath>
#include<cstdio>
using std::cin;
using std::cout;
using db = double;
using cp = std::complex<db>;
const int N = 699;
std::pair<cp, cp> get() {
	int x1, y1;
	int x2, y2;
	cin >> x1 >> y1;
	cin >> x2 >> y2;
	return {cp(x1, y1), cp(x2, y2)};
}


cp A, B, C;
db a, a4, a2;
db sqa;
db cbrta;

db eval(db t) {
	cp X = A * t + C;
	db b = B.real() * X.real() + B.imag() * X.imag();
	db c = std::norm(X);
	db s = a + b + c;
	db val1 = std::sqrt(std::max(s, 0.));
	db val0 = std::sqrt(c);
	db ans = b / a4 * (val1 - val0);
	ans += val1 / 2;

	db xx = (a4 * c - b * b) / cbrta;
	if(xx > 1e-9)  {
		db w = std::fabs((a2 + b + sqa * val1) / (b + sqa * val0));
		if(w > 1e-9)
			ans += xx * log(w); 
	}
	return ans;
}
int main() {
	std::ios::sync_with_stdio(false), cin.tie(0);
	int T;
	cin >> T;
	for(int i = 0;i < T;++i) {
		auto [a0, b0] = get();
		auto [a1, b1] = get();
		if(std::abs(a0 - b0) > std::abs(a1 - b1)) {
			std::swap(a0, a1);
			std::swap(b0, b1);
		}
		A = (b0 - a0);
		B = -(b1 - a1);
		C = a0 - a1;
		a = std::norm(B);
		a4 = a * 4;
		a2 = a * 2;
		sqa = std::sqrt(std::norm(B)) * 2;
		B *= 2;
		cbrta = std::sqrt(a * a * a) * 8;

		int cnt = 0;
		db sum = (eval(0) + eval(1)) * 17
			+ 59 * (eval(1. / N) + eval(1 - 1. / N))
			+ 43 * (eval(2. / N) + eval(1 - 2. / N))
			+ 49 * (eval(3. / N) + eval(1 - 3. / N));
		cnt += (17 + 59 + 43 + 49) * 2;
		cnt += (N - 7) * 48;
		for(int i = 4;i <= N - 4;++i) {
			sum += eval((db)i / N) * 48;
		}
		sum /= cnt;
		printf("%.11lf\n", sum);
	}
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
0 0 1 0
0 0 1 0
0 0 1 0
0 0 0 1
0 0 1 0
0 1 1 1

output:

0.33333333333
0.76519571654
1.07663573290

result:

ok 3 numbers

Test #2:

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

input:

3
0 1 0 0
0 -1 0 2
0 0 1 0
2 0 -1 0
-1000 0 0 999
0 -998 999 0

output:

0.77777777778
0.77777777778
1521.07040502463

result:

ok 3 numbers

Test #3:

score: 0
Accepted
time: 1270ms
memory: 3964kb

input:

100000
-4 -10 -8 -8
5 5 -10 -8
-10 10 -1 -3
-3 5 -1 -3
8 -7 8 -10
0 -3 0 10
6 -1 0 2
0 -3 3 1
-6 -5 5 3
3 5 -4 -8
1 9 1 -1
2 -1 -6 0
1 -2 -7 -9
-1 -2 -4 5
6 -10 7 1
0 -6 -8 -8
-10 9 2 3
-7 -10 4 -9
8 4 4 9
-9 3 0 4
5 -2 9 8
-9 -5 7 8
-1 1 0 1
-4 1 -8 1
3 3 10 3
3 0 -6 -2
-3 -3 -3 3
-2 7 -10 -7
9 2 6...

output:

9.02826761737
5.74413144894
14.59427870289
2.95217824588
4.99350269434
6.05871725601
7.45940870025
11.22802890792
16.32570784749
11.07224515719
9.50455745116
5.50000000000
9.04004998583
5.32634791089
3.03593437129
5.80880418316
17.36371978952
9.99519451924
6.99330262288
6.55043322949
9.16357872589
8...

result:

ok 100000 numbers

Test #4:

score: 0
Accepted
time: 1257ms
memory: 4108kb

input:

100000
0 3 -9 1
-9 1 9 -1
-9 8 -8 6
7 2 -9 8
-7 -9 -1 4
-7 -10 -7 -9
6 1 -2 -10
-2 -10 -1 4
-5 -7 7 6
-10 10 -5 -7
-7 3 -7 -7
-7 3 -10 -8
5 -9 -8 -10
9 10 5 -9
-6 -5 -7 2
3 -2 -6 -5
1 -4 -4 -6
1 -4 -8 1
-8 -3 -6 8
-6 8 0 2
-9 -4 -7 2
2 7 -9 -4
-6 7 6 6
-6 7 0 8
-5 -8 -9 -10
4 -5 -9 -10
10 7 -7 7
10 ...

output:

6.51622634245
7.89515218107
7.61925280412
6.27210135437
10.67658778533
4.04814634927
13.70416881709
5.96072488562
4.75227372389
5.80848685865
6.04933461744
4.21200130355
5.23105219072
7.81688855907
4.83949344052
6.08598005893
8.54084903280
6.89946620105
5.19857570270
7.92716381077
6.97390227742
9.26...

result:

ok 100000 numbers

Test #5:

score: 0
Accepted
time: 478ms
memory: 3972kb

input:

100000
4 9 0 -4
0 -4 4 9
7 0 10 -1
4 1 -2 3
0 -9 -5 -10
-5 -10 5 -8
-5 6 -6 5
-7 4 -5 6
-2 -7 -6 0
-10 7 -6 0
-8 10 -4 1
-4 1 0 -8
-7 1 -7 6
-7 -5 -7 -1
-8 0 -9 10
-7 -10 -9 10
-9 -3 -1 8
-9 -3 -1 8
0 -6 -5 -3
5 -9 0 -6
4 5 -3 -9
4 5 2 1
-5 -3 8 7
8 7 -5 -3
8 -10 -5 1
8 -10 -5 1
-9 -5 2 -2
-9 -5 2 -...

output:

4.53382350291
7.90569415042
3.39934634240
0.94280904158
8.06225774830
9.84885780180
6.50000000000
6.69991708075
4.53382350291
5.83095189485
6.01608765375
5.46707315562
5.67646212198
3.80058475033
5.51764845242
3.88730126323
2.60341655864
4.33333333333
2.86744175568
3.51851851852
8.54400374532
8.4983...

result:

ok 100000 numbers

Test #6:

score: 0
Accepted
time: 477ms
memory: 3976kb

input:

100000
-5 1 -4 1
9 1 -5 1
-7 -9 -6 3
-7 -9 -6 3
-3 -9 10 -9
-3 -9 -5 -9
-9 -8 6 1
1 -2 -9 -8
0 -1 -1 -5
0 -1 -2 -9
3 -8 7 -1
3 -8 7 -1
-10 -1 1 -5
-10 -1 1 -5
-4 2 -6 8
-6 8 -5 5
-7 5 5 0
5 0 -7 5
-7 2 -6 -5
-6 -5 -7 2
2 8 8 -3
8 -3 2 8
-10 7 -5 -8
-5 -8 -8 1
-5 0 -5 -7
-5 4 -5 -7
-2 -6 -10 -1
-2 -6...

output:

6.52380952381
4.01386485960
7.50000000000
5.50701012291
2.74873708375
2.68741924943
3.90156663691
2.10818510678
4.33333333333
2.35702260396
4.17665469538
5.05964425627
3.48484848485
3.14466037735
4.02768199120
7.92322213791
2.35702260396
5.73488351136
2.98142397000
3.88730126323
2.98659556794
7.6485...

result:

ok 100000 numbers

Test #7:

score: 0
Accepted
time: 1264ms
memory: 4132kb

input:

100000
-3 -4 -1 1
-4 -6 6 10
-7 9 10 -5
1 -10 -4 5
9 -8 -8 9
7 -6 1 1
1 4 5 -2
-9 8 0 -10
-2 3 6 -3
-3 -8 7 9
5 5 0 6
-9 0 -8 3
0 0 -10 8
-6 6 -3 -10
-7 1 5 -2
4 4 -10 6
-7 1 5 -1
-6 -5 0 5
3 -8 -8 -5
-9 -6 -1 -3
6 -3 5 -6
4 8 0 5
-10 10 8 -3
-1 8 0 5
-3 -9 7 -5
-1 -8 5 8
5 -4 -6 0
3 -6 6 7
1 7 3 1
...

output:

6.04484155980
8.80690844163
7.21198849248
9.70589445425
5.87988974182
11.75173433657
7.38732746790
7.55250825182
4.79590055441
4.58551111010
11.63658732197
6.53946727358
8.15591894282
6.93275062554
3.74437981791
11.40117290623
16.83994031140
14.41083820144
6.38604219040
10.85098485292
8.60590536424
...

result:

ok 100000 numbers

Test #8:

score: 0
Accepted
time: 1257ms
memory: 4120kb

input:

100000
-7 8 0 7
7 6 -3 3
-8 -3 9 -8
-8 -3 -6 10
-1 10 -4 10
5 10 -8 -5
3 -3 7 -9
7 -9 4 10
9 -3 2 -6
2 -6 3 8
-10 -3 0 -4
-7 4 -10 -3
7 7 -2 7
-3 7 9 10
-4 -10 7 -1
3 -1 -4 -10
3 8 -2 -5
3 8 6 1
-1 -3 6 2
-10 5 6 2
3 7 -3 3
-4 -10 6 9
-10 -8 -1 1
0 -9 6 8
-8 0 -9 6
-9 2 -7 -6
-1 6 0 0
0 3 1 -6
-2 8 ...

output:

6.79709227654
12.42917249580
8.97642614354
7.48612303167
7.13029983845
6.02876929216
4.08793093462
4.82303852246
6.12312872953
7.24663568908
7.72422696118
10.31619372871
5.12430885657
4.79159530309
3.30204723896
2.31224634483
8.41021492085
13.51758445680
8.53396605727
8.54508891240
9.36435660407
6.6...

result:

ok 100000 numbers

Test #9:

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

input:

100000
6 -9 7 6
6 -9 7 6
8 10 -3 -7
-3 -7 8 10
5 7 6 -6
6 -6 5 7
0 -5 -5 7
0 -5 -5 7
-4 7 1 -8
1 -8 -4 7
-7 -2 -3 7
-3 7 -7 -2
-8 3 -10 -8
-10 -8 -8 3
-5 1 -9 8
-5 1 -9 8
-8 3 -5 -2
-5 -2 -8 3
-6 7 -3 -8
-6 7 -3 -8
6 -1 0 1
6 -1 0 1
6 -4 -8 3
6 -4 -8 3
1 -6 -4 10
-4 10 1 -6
-6 10 9 -4
-6 10 9 -4
-2 ...

output:

5.01109879279
6.74948557711
4.34613493680
4.33333333333
5.27046276695
3.28295260060
3.72677996250
2.68741924943
1.94365063162
5.09901951359
2.10818510678
5.21749194750
5.58768487141
6.83942817623
1.69967317120
6.32455532034
3.43187671366
2.82842712475
5.66666666667
4.92160768674
5.20683311727
2.4037...

result:

ok 100000 numbers

Test #10:

score: 0
Accepted
time: 1280ms
memory: 4156kb

input:

100000
50 -71 4 90
-69 -29 12 -1
-98 -38 -10 34
-40 -94 48 19
-2 36 -25 -55
-56 38 -22 -84
-80 -18 28 63
1 -14 74 -19
73 59 76 -61
-52 -28 -97 -91
-9 -54 89 33
-65 93 -64 12
-65 -77 79 87
-95 -40 49 -61
-88 -97 47 83
59 65 -30 -35
-55 59 89 -91
27 98 -17 93
-49 84 74 -90
37 4 -59 -18
72 -27 63 -34
9...

output:

77.59670500473
83.97964536258
49.32720707099
83.97482009952
163.87914759289
128.66299166228
86.71976660298
72.43403508134
120.31719003519
65.37894500151
38.46735804617
142.39434496857
172.48443528336
88.79739764517
103.86100633902
112.66065834055
53.22293395553
53.75087034158
119.34779971239
117.428...

result:

ok 100000 numbers

Test #11:

score: 0
Accepted
time: 1273ms
memory: 3912kb

input:

100000
74 50 60 -48
-17 -68 74 50
57 80 36 23
-1 -98 57 80
94 -87 4 1
4 1 44 -70
8 90 -93 -87
-93 -87 10 -51
56 -56 43 -16
56 -56 49 20
56 -21 85 24
56 -21 -45 24
46 -83 67 -90
46 -83 -96 -54
7 -59 -81 95
52 -63 -81 95
-96 -74 -6 92
-6 92 -100 72
91 33 -9 55
-9 55 -27 5
30 36 58 -40
88 -31 30 36
49 ...

output:

58.36669724431
69.86333097422
43.49076440118
87.08429028032
26.08792701946
68.00521473312
83.47236392388
69.43338765112
86.01244675806
63.71516611381
33.87878464104
62.02907085176
66.29808575395
34.85202327763
40.56538404969
68.63438832842
69.44606647361
85.79222757606
88.73969777692
37.93229653920
...

result:

ok 100000 numbers

Test #12:

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

input:

100000
91 -43 -73 29
9 -7 -73 29
26 25 -20 71
81 -30 73 -22
86 60 65 -5
44 -70 86 60
34 3 -65 23
34 3 -65 23
-8 0 14 99
-20 -54 14 99
-36 5 21 -43
-74 37 59 -75
35 45 -66 -90
-66 -90 35 45
-78 -39 27 -52
27 -52 -78 -39
47 30 -10 -83
-10 -83 47 30
-94 17 55 -63
-94 17 55 -63
15 -20 55 -86
35 -53 15 -...

output:

59.70296847263
104.65180361561
45.53875028783
33.66666666667
49.53245453526
46.13047157968
56.20003954131
35.26723376986
42.18741255135
56.37276726300
25.72504184210
25.51034648486
40.70626487410
35.37742924444
59.70296847263
39.49120858565
29.34090811289
51.06674553954
60.08327554320
70.91935952584...

result:

ok 100000 numbers

Test #13:

score: 0
Accepted
time: 493ms
memory: 3976kb

input:

100000
34 -90 -37 73
-37 73 34 -90
13 -85 60 15
60 15 13 -85
-58 -54 -95 58
-95 58 -58 -54
-3 -70 96 -52
96 -52 74 -56
-59 81 -25 16
-25 16 9 -49
-98 54 40 50
-98 54 40 50
-90 53 6 -50
-90 53 6 -50
-79 22 -27 -18
-79 22 51 -78
3 -25 42 -1
3 -25 -88 -81
-17 46 -79 -40
14 89 -79 -40
-40 18 -8 -2
-8 -2...

output:

59.26400443964
36.83144791555
39.31779354044
40.78753625625
73.35529974037
46.01931961446
46.93375946776
57.95097544956
76.32168761237
50.06446461597
28.30194339617
32.74310784136
38.04237403504
40.31128874149
38.31593808210
66.04922406811
54.11613027144
42.03834228680
62.77030437326
69.51862704465
...

result:

ok 100000 numbers

Test #14:

score: 0
Accepted
time: 1289ms
memory: 4168kb

input:

100000
-43 -66 58 -73
53 59 57 45
57 9 -87 34
-60 -16 23 8
-85 29 60 -50
-60 64 61 -5
17 66 -58 52
95 1 -21 74
-43 -29 52 21
6 6 56 -2
-9 -50 -37 30
-41 -56 -69 41
52 50 42 6
-10 -26 46 85
66 80 35 -54
-3 95 6 7
-49 34 42 47
84 23 -5 -5
46 39 61 24
-61 -35 -96 76
98 -16 81 -35
-5 34 -53 -47
23 -82 -...

output:

133.42268749664
50.64482122157
69.95510565085
65.81167471338
37.06028515650
46.81361097971
45.08393996334
74.73561979552
61.80624311466
136.50767463949
122.81408932319
92.25770707659
63.24931024620
163.58910125070
90.47707782337
124.39735365842
39.99484225562
86.47668397719
66.90797955350
79.4988305...

result:

ok 100000 numbers

Test #15:

score: 0
Accepted
time: 1276ms
memory: 4120kb

input:

100000
7 -57 -48 -29
-8 -36 -48 -29
12 96 28 -93
-47 58 28 -93
-63 -41 -69 60
-10 -21 -63 -41
43 -57 -69 58
-69 58 -74 34
82 -68 61 98
40 -60 82 -68
-46 87 -75 -25
-75 -25 -56 25
92 90 75 88
-27 76 58 -29
50 -100 68 60
60 -93 50 -100
83 -50 76 77
83 -50 -75 80
-80 -69 63 -80
13 58 11 -76
-95 -9 -6 -...

output:

21.46741541957
72.54091622368
55.55096154184
75.73938014219
83.07143567912
39.77770025629
101.94771452229
77.08399137412
94.06647416783
82.12952707455
82.88943706858
57.73284778301
63.88399288101
58.63582061155
103.97445121686
60.05632380045
24.08658931643
118.90046670286
41.30719415827
65.019449385...

result:

ok 100000 numbers

Test #16:

score: 0
Accepted
time: 490ms
memory: 3912kb

input:

100000
-53 -68 -69 -15
-53 -68 -69 -15
35 50 -61 -2
35 50 -61 -2
-52 91 77 -4
-52 91 77 -4
-7 -86 -79 -47
-7 -86 -79 -47
-45 46 -50 90
-50 90 -45 46
-25 -2 -32 -58
-25 -2 -32 -58
71 20 82 23
82 23 71 20
-97 94 64 51
64 51 -97 94
-26 -87 -1 -16
-1 -16 -26 -87
-58 30 -21 -28
-21 -28 -58 30
-26 -90 -63...

output:

18.45414738089
36.39291750388
53.40203907884
27.29468812791
14.76105988366
18.81193474603
3.80058475033
55.54777723326
25.09094568875
22.93226741709
38.05405512046
16.60655827611
19.84663419547
50.98256782688
26.30800469650
51.80840772607
30.11275108285
42.06476488041
57.27128425311
10.93414631124
1...

result:

ok 100000 numbers

Test #17:

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

input:

100000
541 17 967 -860
-970 -232 419 -236
-905 -139 -974 -189
24 267 -912 974
207 -639 398 -939
-31 -897 -527 -91
109 357 234 -959
-778 -920 -4 43
645 395 522 372
773 547 563 712
-777 -353 183 -700
218 562 -17 111
924 41 71 -664
-756 845 -939 103
-601 739 584 -670
-481 158 454 -810
-189 -92 -417 -66...

output:

1077.38888797746
986.15453945945
675.17545469070
731.44677503952
271.78366971903
994.70729177149
1599.69610206081
655.57913241349
1290.25723218962
500.63404195979
1131.04017343325
1252.72658828710
736.80458666669
508.48755458786
909.40875137193
898.40420563322
693.48968034586
1108.47134716789
798.17...

result:

ok 100000 numbers

Test #18:

score: 0
Accepted
time: 1277ms
memory: 4000kb

input:

100000
344 -566 -889 -145
418 -90 344 -566
-221 -485 -190 757
-221 -485 116 -337
-166 159 -185 697
-166 159 307 -455
-587 728 197 -273
-587 728 -74 -682
-926 913 318 -963
847 -224 318 -963
979 -674 792 574
-250 454 792 574
339 165 420 -963
420 -963 -923 606
-44 939 28 767
964 -974 -44 939
934 -842 9...

output:

692.58757060345
601.72070978281
631.81913574083
543.74786928449
1141.29715732129
897.08711649781
850.44680759126
993.82085279535
668.22453262403
237.79189394871
317.79731051363
248.83005477059
843.11654142342
454.65689001369
710.14561993334
742.53405738678
564.87691041000
998.89500266399
613.6569204...

result:

ok 100000 numbers

Test #19:

score: 0
Accepted
time: 505ms
memory: 3844kb

input:

100000
249 365 292 977
292 977 163 -859
-939 -821 521 351
521 351 156 58
109 21 -421 -294
109 21 -951 -609
599 873 -452 388
-452 388 599 873
755 -589 -780 97
-780 97 755 -589
-122 556 860 -72
369 242 860 -72
-529 834 -340 752
-340 752 227 506
-481 -801 -193 -813
263 -832 -1 -821
78 -169 -301 143
-30...

output:

681.67640127071
741.08457494555
411.02852023241
385.83617709535
560.43841965217
388.54543563856
412.04368700418
468.40607382911
327.26815372786
487.84480683467
773.05691899109
156.55315036399
264.63916733713
649.91495170095
555.64117118075
389.34100702737
221.93217182033
759.97618766793
388.70537435...

result:

ok 100000 numbers

Test #20:

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

input:

100000
912 -157 133 -554
133 -554 912 -157
-48 -679 -180 -647
-180 -647 -147 -655
-238 181 -27 333
-27 333 -449 29
107 278 808 844
-594 -288 107 278
-261 -116 507 229
507 229 -261 -116
-191 147 823 -838
-191 147 823 -838
170 -405 -629 -119
170 -405 969 -691
242 887 -621 -246
242 887 -621 -246
730 42...

output:

291.44277120713
53.76343501344
173.36538165261
900.97558235504
280.64390248142
471.21839711303
848.64421284776
474.74648205355
402.16110646799
666.68749967449
217.98871100357
357.43095681388
514.07532954271
216.24112056272
222.04403967582
410.78529130868
609.80017218758
445.04032276737
403.544985789...

result:

ok 100000 numbers

Test #21:

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

input:

100000
188 593 -923 -569
527 -406 -314 383
925 -781 -643 79
68 -89 -997 951
-691 -611 -189 124
-863 -526 -142 -22
-657 -960 980 397
11 -891 -435 181
216 -951 -407 -624
954 726 555 -876
-66 734 355 502
566 -400 -983 -657
417 -546 599 -858
183 -675 -599 301
782 144 -849 -434
-634 -83 620 207
961 -786 ...

output:

674.20827652712
1056.72040124959
311.65486795917
714.63656777098
1164.81630994823
1274.09143926362
891.56537304844
570.65575976340
966.17462356318
1218.86185674817
537.98806119222
1086.36447265293
1227.39344574786
647.33886589400
398.21584652034
615.48298031142
662.02658674536
621.66676352765
597.34...

result:

ok 100000 numbers

Test #22:

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

input:

100000
-750 -751 -173 134
680 936 -750 -751
-324 -818 78 196
-56 -142 553 576
-385 968 443 131
-588 288 811 -241
-652 -352 149 771
-652 -352 -67 131
363 -636 -888 -192
533 -371 -888 -192
148 841 407 762
532 792 407 762
747 810 438 490
-480 -268 -489 -470
-149 920 -153 -200
-155 -760 -312 -774
860 -9...

output:

756.69262554129
668.26422676002
707.76053500733
478.44411198466
502.73792249502
194.59780668501
1483.23539433007
1131.24946559058
1485.94530417307
607.10392663366
645.86552525311
737.66843825443
830.46701978653
588.63594259288
480.15517536134
666.05512699484
723.14920199008
562.88170718282
605.00264...

result:

ok 100000 numbers

Test #23:

score: 0
Accepted
time: 499ms
memory: 3792kb

input:

100000
-802 -93 -8 607
-802 -93 -8 607
-861 338 748 -826
-861 338 748 -826
559 912 -927 -473
559 912 -927 -473
381 40 -776 -706
381 40 -776 -706
340 -550 -421 -502
-421 -502 340 -550
895 -134 75 912
75 912 895 -134
-178 -448 242 763
-178 -448 242 763
995 56 -708 -699
-708 -699 995 56
-149 570 -999 3...

output:

352.83549834007
661.96483625979
677.11979901803
458.88330639596
254.17076499428
443.03448574073
427.25493300579
620.95213628391
294.96063767523
229.98792238821
403.06878376332
181.50237219142
329.79539111395
51.00980297943
325.94904168869
431.53266903497
289.91378028648
318.47989645258
297.147363366...

result:

ok 100000 numbers

Test #24:

score: 0
Accepted
time: 1216ms
memory: 3964kb

input:

100000
774 -797 772 -799
-831 601 -831 600
305 -123 307 -124
-251 -445 -251 -443
429 654 429 652
160 972 158 971
-741 979 -739 980
128 793 126 791
-288 173 -286 171
-922 989 -922 987
351 405 351 406
289 -675 290 -677
-671 38 -669 40
109 898 108 899
-485 803 -485 802
-84 -604 -83 -604
-810 -556 -808 ...

output:

2128.05520626272
642.62725590502
417.54374932038
887.04333853407
1033.96379817575
1083.24724938579
1159.65627143841
1462.68403400507
1079.07861931688
1280.99192907853
376.52246502263
1844.75868494035
650.38075781841
1337.52780651744
598.67236723335
1067.94235420729
1086.28786496755
1628.45583951553
...

result:

ok 100000 numbers

Test #25:

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

input:

100000
838 139 848 133
-348 -703 -329 -683
85 483 76 466
-11 470 -7 475
11 857 12 858
209 465 191 458
289 331 270 315
375 53 389 42
-456 -466 -476 -447
-41 118 -21 133
306 -630 303 -614
-688 -257 -703 -243
409 -809 397 -820
-376 449 -379 464
307 -718 326 -731
-167 13 -166 -4
-293 -514 -307 -504
327 ...

output:

1443.32781960888
89.66493089276
438.61066254927
294.03956295597
726.64686919335
1066.96082774716
1491.52434452235
874.49548223395
806.06159683918
355.62713280674
1016.71507551624
1133.71957200671
1395.02927606225
1085.92748925156
842.22975937495
1234.80894272676
1826.02027538347
1133.50465081466
177...

result:

ok 100000 numbers

Test #26:

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

input:

100000
-849 -426 -958 -542
591 741 536 872
137 144 30 208
-65 -890 34 -865
-848 965 -982 888
571 563 473 575
634 436 491 422
106 -606 -88 -456
-754 -615 -579 -650
-750 431 -885 432
-716 145 -614 226
744 13 767 -130
484 469 455 416
-431 125 -337 -18
850 943 651 808
468 -244 366 -349
152 -355 -22 -203...

output:

1954.22897810559
1059.00386196265
1481.12927539359
1110.86218874913
1076.44887747803
1442.11878277704
939.29471817129
1219.51180983343
1281.36557924967
620.15574103185
985.29102589886
745.87494219844
1019.80379999559
345.07486931385
1199.57024606447
1075.48071490324
883.42664890168
312.94189198955
6...

result:

ok 100000 numbers

Test #27:

score: 0
Accepted
time: 1274ms
memory: 4048kb

input:

100000
779 476 858 385
763 758 -781 -760
-942 873 125 -978
-941 814 830 -654
793 794 -884 -602
-757 720 -808 -830
-399 -322 351 613
-771 -341 554 804
674 -821 413 33
-985 590 -803 -782
415 961 540 -981
-534 -861 521 465
18 589 -520 916
559 -852 972 402
53 246 -606 739
511 -989 -148 -487
489 896 -181...

output:

981.62412503053
866.36798621361
969.87172539893
533.14842897477
1532.60958491547
822.84421746468
1452.87521258509
1326.82620858797
740.52199764937
833.74173272454
1200.73829397659
961.07512097567
1028.98005834683
794.07730516454
530.43790403685
763.05050456290
848.33994872023
773.51094577841
827.722...

result:

ok 100000 numbers

Test #28:

score: 0
Accepted
time: 1226ms
memory: 4120kb

input:

100000
521 -728 519 -728
-162 774 -162 772
237 876 235 876
16 -531 16 -533
321 -378 321 -380
-445 968 -443 968
124 -293 122 -293
173 251 173 249
264 841 266 841
210 617 210 619
-648 324 -648 322
126 -284 128 -284
393 -118 393 -120
-804 -335 -802 -335
265 989 265 987
540 -922 542 -922
-477 114 -479 1...

output:

1648.67381047112
1425.08397413394
1549.07531557808
545.29747233379
229.68311504043
984.41573196153
1215.34864682255
1929.83842156108
890.05636525637
1527.40968090861
682.44071781622
1575.63362915792
241.37384558772
1183.69773731868
212.25063800711
1475.24416058270
764.06893231787
861.26089736702
165...

result:

ok 100000 numbers

Test #29:

score: 0
Accepted
time: 1230ms
memory: 4092kb

input:

100000
897 739 897 759
13 480 15 480
-841 -220 -841 -200
850 -190 852 -190
-191 -980 -191 -1000
470 -539 468 -539
-89 222 -89 202
-621 -319 -623 -319
306 -482 306 -462
570 -816 572 -816
103 -486 103 -466
468 264 470 264
-264 -4 -264 16
960 667 962 667
-484 -137 -486 -137
255 557 255 537
-580 -481 -5...

output:

923.08208234858
1692.12804735623
799.38966066702
752.37417295715
434.25064843527
825.56817995059
1391.96691478965
1007.70736302753
692.44971634123
2011.87858985744
1546.16699702386
1072.78393982504
1535.84399362212
1741.92194702109
1943.88212842648
1344.74150692687
786.81093603803
1087.74186304505
1...

result:

ok 100000 numbers

Test #30:

score: 0
Accepted
time: 1285ms
memory: 3912kb

input:

100000
-875 312 -875 512
74 -22 76 -22
456 351 456 151
33 995 35 995
-64 374 -62 374
-69 652 -69 452
-109 758 -107 758
-169 -760 -169 -960
9 258 9 458
-650 -516 -652 -516
-951 -104 -951 -304
966 314 968 314
130 996 130 796
-795 949 -793 949
131 737 129 737
-766 476 -766 276
636 -90 638 -90
-535 -565...

output:

1045.76051033391
855.82503867396
178.11537656659
1619.15103534142
1095.76017292625
1987.49958110160
927.31058210429
967.47385023568
1306.48256708191
814.24762593459
1407.22006601196
779.37707264272
954.14552277846
662.20903971779
798.62442051960
952.89717162911
606.88698671888
573.91333774494
810.59...

result:

ok 100000 numbers

Test #31:

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

input:

100000
523 -62 525 -62
-256 -1000 -256 1000
74 1000 74 -1000
590 -824 588 -824
996 621 998 621
78 -1000 78 1000
-291 -265 -293 -265
-638 -1000 -638 1000
601 1000 601 -1000
121 455 119 455
-542 1000 -542 -1000
-111 -565 -113 -565
-280 -669 -282 -669
98 -1000 98 1000
-901 -392 -903 -392
119 1000 119 -...

output:

960.35005414464
1041.54473838472
1215.50418856677
668.94283988068
818.34505050447
835.24206806104
862.66974232269
1219.58280708622
1021.59835077300
592.81787824862
970.97729172419
645.14716087850
1484.87296623941
1499.72803126841
987.13969999744
1712.11517280820
1192.11548482705
649.74399397860
724....

result:

ok 100000 numbers

Test #32:

score: 0
Accepted
time: 1230ms
memory: 4088kb

input:

100000
348 475 348 495
869 956 889 956
-147 -417 -127 -417
-196 542 -196 522
859 -89 859 -69
52 -872 72 -872
-169 787 -189 787
166 -910 166 -890
-71 -161 -71 -141
693 153 673 153
239 965 259 965
245 -35 245 -55
-572 -551 -592 -551
189 189 189 209
-191 701 -191 721
833 494 813 494
-575 -961 -555 -961...

output:

709.81359064704
950.84979586809
1124.31816376741
1721.92547271646
812.99774542840
1010.02442257830
1075.62741382968
1036.97557060433
2360.49853491765
1353.16012866859
979.41734411985
1329.06972479773
632.42259091317
329.54262460139
1359.93063565605
638.74512543961
697.83761269855
1061.61637777250
46...

result:

ok 100000 numbers

Test #33:

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

input:

100000
135 -772 115 -772
-720 185 -720 385
786 -969 766 -969
-560 -361 -560 -161
-726 369 -746 369
238 992 238 792
471 -279 471 -79
-506 -446 -486 -446
611 500 611 700
150 -770 130 -770
-434 -689 -434 -889
-485 -790 -505 -790
-875 -658 -875 -858
305 115 325 115
486 725 486 925
224 -272 204 -272
820 ...

output:

1353.73424209318
1512.86835763556
1106.70751031725
1004.72734074961
1448.83541470806
82.26407849016
1476.62091906484
1130.31781767510
1273.98012863946
886.02914982285
913.98247016537
968.04629275452
1176.43975116979
1276.15518452275
925.08754903802
1114.45700514968
782.29018318842
862.73483090768
10...

result:

ok 100000 numbers

Test #34:

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

input:

100000
-152 1000 -152 -1000
-564 214 -584 214
691 423 711 423
976 -1000 976 1000
182 896 162 896
80 1000 80 -1000
-350 1000 -350 -1000
375 -245 395 -245
-69 1000 -69 -1000
695 541 715 541
154 -1000 154 1000
314 -422 334 -422
839 986 819 986
226 -1000 226 1000
690 168 710 168
-275 -1000 -275 1000
-41...

output:

706.03703463850
680.28103586935
913.32035111837
945.76400218016
1067.51207777722
630.58355166436
1208.11422741168
1135.90408243319
1213.19646461812
731.92650584987
1432.29037652355
1357.92873481059
939.38754444719
1599.50823504707
864.82172688203
800.84840308248
753.50591364252
1085.01307238736
626....

result:

ok 100000 numbers

Test #35:

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

input:

100000
270 947 270 747
481 -496 281 -496
343 -718 343 -918
618 -836 818 -836
-875 367 -875 567
762 644 962 644
725 -196 525 -196
760 79 760 -121
-855 505 -655 505
-59 -736 -59 -536
-366 238 -166 238
-625 -517 -625 -317
-975 -1000 -975 -800
-979 71 -779 71
-197 -525 3 -525
91 274 91 74
-300 215 -100 ...

output:

1348.81729788471
379.92700048399
1746.94995277180
228.50548455996
1337.77114133792
749.16266574449
977.44530759650
726.14826536683
555.41255079558
480.85862735575
873.53932344761
1093.31458004003
1217.37988852392
1287.46669981102
904.79051089889
2012.90836672570
1667.98360928861
454.62638909123
1133...

result:

ok 100000 numbers

Test #36:

score: 0
Accepted
time: 1285ms
memory: 4048kb

input:

100000
-665 947 -465 947
-789 -1000 -789 1000
597 621 397 621
948 1000 948 -1000
300 1000 300 -1000
-273 -96 -73 -96
215 -1000 215 1000
64 486 -136 486
-156 635 44 635
-644 1000 -644 -1000
-97 961 103 961
38 -1000 38 1000
486 1000 486 -1000
383 -728 183 -728
-816 989 -616 989
-627 -1000 -627 1000
12...

output:

997.37299132311
878.74046967162
725.33578302404
697.21229633495
975.75948355477
967.46725224675
817.11650751856
1000.44690601428
554.61995654720
905.52321444885
634.05971229716
662.58772679710
940.98846851453
693.89190087589
1461.17086427120
641.05536508226
949.52206247300
534.97688253369
1382.56690...

result:

ok 100000 numbers

Test #37:

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

input:

100000
-501 1000 -501 -1000
-1000 397 1000 397
-1000 380 1000 380
404 -1000 404 1000
-1000 -818 1000 -818
997 1000 997 -1000
1000 -447 -1000 -447
-851 1000 -851 -1000
665 1000 665 -1000
1000 560 -1000 560
1000 801 -1000 801
-256 -1000 -256 1000
1000 841 -1000 841
-864 1000 -864 -1000
649 1000 649 -1...

output:

940.48973029219
897.98785386533
1418.64601049212
1150.51477755038
1081.80952813704
1066.09216721523
1344.50330238333
1065.97849390999
1141.90576227060
1107.05986276670
1059.28603968362
1186.83070535722
884.84016641308
1241.86329879583
1150.35623882295
964.00705329119
835.76012993588
972.42463383248
...

result:

ok 100000 numbers

Test #38:

score: 0
Accepted
time: 1224ms
memory: 4132kb

input:

100000
601 668 600 667
-269 235 -271 237
-679 521 -678 521
119 850 119 852
-580 652 -581 654
427 -652 425 -653
-166 980 -165 979
793 324 791 322
509 903 510 902
-836 -298 -837 -299
284 405 286 406
992 -469 993 -471
-671 38 -669 40
899 -465 898 -464
-485 441 -485 443
-288 -943 -287 -943
-810 -556 -80...

output:

971.57764261344
863.07968738995
1648.44560622021
1160.94752244075
1803.91717289533
1125.63622750281
1647.33271143877
1399.01084281562
1089.20113626514
1220.78055631087
528.30956933560
547.27194493904
347.55563104019
1450.15272184232
619.34862892857
701.20634148125
1165.36900450748
412.91514463296
73...

result:

ok 100000 numbers

Test #39:

score: 0
Accepted
time: 1229ms
memory: 4148kb

input:

100000
217 840 197 859
150 347 169 367
-647 887 -652 891
208 -751 224 -731
-463 580 -451 592
-776 283 -790 297
701 651 690 637
-632 753 -618 742
968 721 983 701
-198 56 -182 68
-125 191 -111 206
-917 766 -932 780
518 520 523 521
203 -624 199 -604
-64 442 -81 441
-292 640 -291 623
-416 75 -400 83
51 ...

output:

494.84938941767
1845.54513655473
440.36876532024
1324.55989548635
1334.03260537817
990.21592810534
1178.63454174185
289.97442476584
503.28587523962
1291.71884844009
1431.55355589013
647.73232787009
1052.77818983114
997.67726078464
2118.03704327122
1655.07276958656
1422.54062655671
812.70305942955
14...

result:

ok 100000 numbers

Test #40:

score: 0
Accepted
time: 1283ms
memory: 4156kb

input:

100000
360 -274 251 -390
-598 257 -714 366
209 746 102 810
436 773 372 666
-540 -573 -552 -671
182 -519 84 -507
862 -174 719 -188
105 -283 119 -426
-650 -949 -615 -956
627 -445 635 -405
390 522 247 499
914 -544 937 -687
-560 -529 -618 -635
249 698 196 727
282 45 247 79
894 227 860 192
-295 664 -273 ...

output:

1157.88096104608
257.84518865721
688.28420916177
701.56206664619
1369.23957765991
1279.87269721520
1527.92997914082
630.16738677568
401.71637348669
728.48074478516
519.82504938896
1531.22594601646
1241.19686281585
1131.25778352706
554.59802553615
805.28010122161
634.84828406885
880.53769684302
1371....

result:

ok 100000 numbers

Test #41:

score: 0
Accepted
time: 1280ms
memory: 4124kb

input:

100000
69 -340 543 -886
-853 -970 -307 -496
-519 -788 949 983
-993 537 778 -931
790 506 -887 -890
783 -859 -613 818
-161 -680 -619 -150
-867 -894 723 480
-215 -884 -737 824
804 879 -904 357
-856 472 470 -583
-513 -352 542 974
765 -365 -489 48
584 -439 997 815
559 995 -947 -982
962 -723 -356 281
446 ...

output:

918.38664117230
952.78796640939
853.87981205617
644.96074379606
965.48169659155
739.69316692800
839.42566358393
941.41702218412
670.53161427048
519.56926714071
987.68762542519
954.93694579073
772.16201142705
1001.19277584900
1225.75798773749
956.70119777420
478.46343334035
716.11510011227
592.912199...

result:

ok 100000 numbers

Test #42:

score: 0
Accepted
time: 1226ms
memory: 4136kb

input:

100000
601 668 600 667
-271 235 -269 237
321 -123 321 -124
119 850 119 852
264 -750 266 -749
427 -652 425 -653
-165 980 -166 979
793 324 791 322
509 903 510 902
-836 -299 -837 -298
11 -656 12 -658
992 -469 993 -471
-671 40 -669 38
899 -465 898 -464
-963 -915 -961 -915
-288 -943 -287 -943
-808 -556 -...

output:

971.57736957358
995.21568876578
187.96277593600
1160.94758939596
1803.91721879261
998.66449409232
1647.33259366495
675.08092160629
1089.20089318232
1220.78050979278
528.30962257801
918.99486752617
957.44959628301
843.59542994577
619.34904336630
110.78888250459
707.64966769725
636.45489482860
404.610...

result:

ok 100000 numbers

Test #43:

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

input:

100000
-682 -147 -663 -127
150 347 169 367
378 94 382 99
208 -751 224 -731
-463 580 -451 592
-790 283 -776 297
234 575 220 586
-632 753 -618 742
-456 3 -476 -12
-198 56 -182 68
981 -957 996 -971
-917 766 -932 780
574 121 575 116
203 -624 199 -604
304 329 303 346
-292 640 -291 623
5 106 13 90
51 286 ...

output:

967.61013323383
853.41355874681
440.33184260063
868.21883243923
283.92193771350
2583.93846931262
822.23638103020
663.69985529642
198.80873469329
1276.23374637329
514.59097364215
1160.78455761629
416.85131043541
1020.46511108768
2099.59287555247
661.44664040105
338.96593128230
1564.37068963512
1525.8...

result:

ok 100000 numbers

Test #44:

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

input:

100000
360 -274 251 -390
434 181 543 297
209 746 102 810
-240 98 -347 162
-63 -698 -161 -686
182 -519 84 -507
862 -174 719 -188
-475 -282 -618 -296
-650 -949 -615 -956
-514 -953 -474 -961
-486 313 -509 456
914 -544 937 -687
-560 -529 -618 -635
-460 722 -431 775
865 -396 899 -361
894 227 860 192
324 ...

output:

600.27276829838
789.98775342802
304.69706715762
1341.35528385067
138.59762370173
1739.74881154042
1338.29971850998
588.18812847053
604.19807220011
1314.84943060661
864.45162992329
1385.45026306124
1121.56652537852
803.23410047100
1195.46574710593
615.80060532076
888.43103980421
1129.05750014626
1110...

result:

ok 100000 numbers

Test #45:

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

input:

100000
69 -340 543 -886
-529 -436 -55 -982
-958 783 813 -685
-993 537 778 -931
790 506 -887 -890
-742 -654 935 742
-564 -478 -34 -20
-867 -894 723 480
-215 -884 -737 824
-327 -987 -849 721
254 505 -801 -821
-513 -352 542 974
-957 -860 -544 394
584 -439 997 815
997 -829 -980 677
962 -723 -356 281
446...

output:

658.04765107203
824.88725322504
769.33369553223
585.41054884352
627.18896171020
729.22322612552
1662.04676105091
761.55766229681
715.55521084984
795.56052637353
854.16325252444
844.44315246332
922.97202396375
561.53477048893
648.06647564139
846.91126366293
905.32243399457
752.41807608105
569.6157801...

result:

ok 100000 numbers

Test #46:

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

input:

100000
667 803 668 805
-31 132 -30 132
-679 521 -678 521
280 -418 279 -418
-904 -471 -904 -470
158 971 160 972
558 787 558 786
-741 979 -739 980
-100 379 -100 378
-113 295 -112 294
351 405 351 406
-679 -508 -679 -507
716 176 716 175
-465 -155 -464 -154
-183 -145 -182 -145
-84 -604 -83 -604
412 111 4...

output:

968.91077329920
1341.44887404038
1791.46116771892
1312.27025370659
84.92561101356
1376.39714230055
1225.75705888774
469.55527817060
523.28961666272
454.91129451823
1065.49634645826
1785.23840552877
306.03010663075
1026.47865804397
2144.84928039567
1029.25610504683
1053.36284572950
680.48531791277
59...

result:

ok 100000 numbers

Test #47:

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

input:

100000
-329 -683 -348 -703
287 144 286 145
591 -422 592 -421
836 -803 832 -800
12 858 11 857
-974 93 -974 94
-948 769 -949 767
729 -64 718 -59
421 499 418 488
-615 -39 -611 -40
-447 -64 -466 -68
615 939 616 934
-934 706 -935 712
385 306 368 303
-820 466 -809 452
-514 295 -509 299
928 307 923 326
324...

output:

1045.00349375839
450.78450115247
1246.95882236756
1866.45511080368
1161.96030300979
1467.71940207771
1371.98720391585
343.59883487949
639.30910328588
1442.22251161706
1074.87518129233
664.02311270449
1428.34829095494
545.74211840261
1507.30872579670
1781.35575713479
1029.23916181704
419.44496199035
...

result:

ok 100000 numbers

Test #48:

score: 0
Accepted
time: 1276ms
memory: 4024kb

input:

100000
-958 -542 -849 -426
-276 -395 -309 -364
-734 -761 -852 -566
-866 -267 -904 -290
-254 -414 -191 -607
943 390 894 374
888 421 965 381
-608 635 -621 610
-564 106 -563 -88
89 490 88 490
927 -657 928 -659
-650 -374 -615 -357
-100 744 -300 767
-562 296 -572 209
878 -77 885 -97
-143 484 -226 455
873...

output:

620.58147722326
396.56101579367
1449.65446414413
1556.87846981034
811.49017318123
1587.19917198509
624.83141620695
1202.66722104045
1497.84808966332
1888.78762138242
743.93889738615
614.89972098647
1882.66558701940
697.29704360282
1655.68660110815
1513.52203985448
1537.86368087667
1070.95182374101
7...

result:

ok 100000 numbers

Test #49:

score: 0
Accepted
time: 1285ms
memory: 4156kb

input:

100000
585 958 547 925
779 476 858 385
955 -480 19 -743
-955 999 -395 -994
-867 248 32 950
-976 197 -723 -127
840 -84 739 -683
921 928 749 957
-322 134 613 -278
131 -356 324 82
570 877 561 962
-959 -985 760 -803
517 415 -756 540
-998 -711 -960 -324
-472 211 -229 530
511 -989 -148 -487
-720 -893 986 ...

output:

570.22215047963
1404.03251966264
728.05302282089
1327.94291228797
309.13245910825
1983.38714001356
1351.53096200199
1238.88235657684
679.30535991565
990.13180362676
899.67224493071
1572.78252782872
1036.93497486311
863.18666935486
1317.12080118861
804.06571263582
960.90740790846
992.08575497353
1170...

result:

ok 100000 numbers

Test #50:

score: 0
Accepted
time: 1221ms
memory: 4228kb

input:

100000
667 803 668 805
-831 600 -831 601
321 -124 321 -123
280 -418 279 -418
-652 497 -653 497
158 971 160 972
-878 -419 -877 -419
-741 979 -739 980
279 -411 280 -411
-113 295 -112 294
351 405 351 406
-49 -833 -50 -833
728 957 729 957
-465 -155 -464 -154
-943 -399 -943 -398
-84 -604 -83 -604
-18 -23...

output:

1512.25489458054
297.40979024469
940.04389419597
1405.24335295203
807.09003602346
1301.64610525800
1630.54631609513
883.72540041199
164.50709204608
1003.43383691586
561.93263255014
1119.11777009095
857.61263411756
402.08742031888
940.81282758812
1318.43645086583
424.50785460125
806.64915254954
1275....

result:

ok 100000 numbers

Test #51:

score: 0
Accepted
time: 1226ms
memory: 4156kb

input:

100000
-329 -683 -348 -703
287 145 286 144
592 -422 591 -421
836 -803 832 -800
12 858 11 857
829 360 828 360
-38 33 -36 32
729 -64 718 -59
421 499 418 488
-306 735 -305 739
-447 -64 -466 -68
879 882 884 883
-244 937 -250 936
385 306 368 303
-820 466 -809 452
-619 -138 -623 -133
928 307 923 326
442 1...

output:

1045.00341730770
450.78433348912
956.55393465888
766.28805569059
764.80680892901
1640.09194315410
887.80354579811
625.20081001312
505.71907805559
1631.08346493162
1055.28286763557
610.40373978750
828.44897812000
495.54045322365
1836.03829791678
1228.31027112934
930.40700818333
76.58710096715
654.887...

result:

ok 100000 numbers

Test #52:

score: 0
Accepted
time: 1280ms
memory: 4052kb

input:

100000
-958 -542 -849 -426
16 -48 -15 -81
-734 -761 -852 -566
-760 663 -737 625
-254 -414 -191 -607
-753 -878 -737 -927
888 421 965 381
399 -273 424 -286
-564 106 -563 -88
996 938 996 937
416 -731 418 -730
-650 -374 -615 -357
-100 744 -300 767
-748 43 -661 33
589 -67 609 -60
-143 484 -226 455
873 85...

output:

996.75205866384
1308.77159404107
655.70303126721
853.80276584610
1815.62193645800
1111.18798405713
878.87979477096
947.84055462106
845.61049250191
1171.70696945983
579.10527818889
1399.88125331466
1107.87256952464
556.78122697679
1902.85484197343
1400.11866128806
752.13418275328
959.69210374551
1710...

result:

ok 100000 numbers

Test #53:

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

input:

100000
680 652 713 614
779 476 858 385
607 338 870 -598
-955 999 -395 -994
-867 248 32 950
-876 92 -552 345
840 -84 739 -683
-58 -374 -87 -546
-322 134 613 -278
-328 768 -766 961
-530 94 -615 85
-959 -985 760 -803
517 415 -756 540
100 640 -287 678
-535 697 -854 940
511 -989 -148 -487
-720 -893 986 8...

output:

236.50486837122
1547.01278460291
514.28098019830
883.12728165437
1177.35872883497
1188.32567604550
393.64916312388
1789.30030334787
816.58430481612
953.10594180528
597.47725048448
800.94532143289
1218.84789338583
666.42945640003
728.75461788713
469.36517287822
595.41008429030
1129.68744990101
709.59...

result:

ok 100000 numbers

Test #54:

score: 0
Accepted
time: 1221ms
memory: 4036kb

input:

100000
-1000 -998 -999 -1000
1000 999 1000 1000
-1000 -1000 -999 -998
1000 1000 1000 999
-1000 -998 -999 -1000
1000 1000 1000 999
999 1000 1000 1000
-1000 -999 -1000 -1000
999 1000 1000 1000
-1000 -999 -999 -1000
-1000 -999 -998 -1000
999 1000 1000 1000
1000 999 1000 1000
-999 -998 -1000 -1000
-1000...

output:

2827.01307332493
2827.01301436990
2827.01307332493
2827.72003270008
2827.36652352393
2827.01307332493
2827.01301436990
2827.01307332493
2827.01301436990
2827.01301436990
2827.01301436990
2827.72003270008
2827.01301436990
2827.01301436990
2827.72003270007
2827.01307332493
2827.36652352393
2827.013073...

result:

ok 100000 numbers

Test #55:

score: 0
Accepted
time: 1221ms
memory: 4104kb

input:

100000
-1000 1000 -1000 999
1000 -990 999 -1000
998 -1000 1000 -989
-999 1000 -1000 995
-1000 1000 -1000 999
1000 -1000 999 -989
1000 -987 999 -1000
-1000 999 -1000 1000
-1000 1000 -1000 999
1000 -1000 999 -993
999 -1000 1000 -981
-1000 1000 -1000 999
-1000 999 -1000 1000
1000 -987 999 -1000
999 -10...

output:

2824.18759889748
2821.71487057081
2823.83435637243
2823.12902313470
2825.24650167829
2821.01347568478
2823.12902313470
2821.71842021501
2825.95307692285
2825.95248692992
2820.65665228582
2826.65959369268
2827.72003270008
2825.24670814959
2822.42315990912
2823.12902313470
2826.30623205166
2826.659682...

result:

ok 100000 numbers

Test #56:

score: 0
Accepted
time: 1218ms
memory: 4148kb

input:

100000
-998 1000 -1000 957
999 -1000 1000 -979
-1000 1000 -999 846
1000 -999 1000 -1000
-1000 938 -999 1000
1000 -1000 1000 -999
-1000 828 -999 1000
1000 -999 1000 -1000
1000 -1000 999 -914
-1000 1000 -998 827
-1000 1000 -999 999
1000 -1000 999 -1000
1000 -1000 1000 -999
-1000 861 -999 1000
-1000 80...

output:

2804.84086122411
2773.99007103901
2805.91525596023
2767.81213926639
2737.58933583570
2827.36649405009
2779.16274289565
2758.91898940328
2743.71752387895
2781.83653340971
2796.48983718719
2761.65062811187
2821.01291442753
2814.32842640723
2805.56546688594
2799.62604418083
2822.42315990913
2759.595593...

result:

ok 100000 numbers

Test #57:

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

input:

100000
1000 1000 998 923
-1000 -1000 -999 -962
-1000 -999 -1000 -1000
1000 1000 999 -934
-1000 -1000 -1000 -999
1000 85 999 1000
999 -370 1000 1000
-1000 -999 -1000 -1000
-1000 -923 -999 -1000
998 1000 1000 845
-1000 -229 -999 -1000
998 1000 1000 -543
1000 -527 999 1000
-1000 -1000 -1000 -999
-1000 ...

output:

2787.04299735820
2304.98327238501
2533.74140472467
2415.81802182205
2746.78223564055
2217.19168222504
2380.76599794151
2433.12711875901
2522.91300986897
2338.99693936947
2740.65758982821
2767.32555425652
2400.82348015214
2163.23513778884
2567.81442099886
2587.41241102750
2644.43240059899
2330.268638...

result:

ok 100000 numbers

Test #58:

score: 0
Accepted
time: 1223ms
memory: 4164kb

input:

100000
1000 999 999 1000
-996 -1000 -1000 -995
999 1000 1000 998
-997 -1000 -1000 -995
-998 -1000 -1000 -991
999 1000 1000 996
-995 -994 -1000 -1000
1000 1000 999 999
998 1000 1000 993
-1000 -982 -995 -1000
1000 1000 999 993
-1000 -1000 -997 -980
1000 1000 1000 999
-1000 -1000 -999 -998
997 1000 100...

output:

2824.53868653984
2824.53877513847
2822.77356387875
2823.83096019955
2817.12512703435
2817.48112636535
2827.01301436990
2815.00176489230
2816.05299314323
2821.00581534158
2819.59890972643
2818.88541207983
2822.77356387875
2816.05299314323
2821.71392471184
2824.53806696965
2822.42315990913
2813.591059...

result:

ok 100000 numbers

Test #59:

score: 0
Accepted
time: 1228ms
memory: 4148kb

input:

100000
985 -1000 1000 -884
-1000 969 -996 1000
987 -801 1000 -1000
-1000 1000 -997 954
-1000 999 -1000 1000
999 -1000 1000 -949
989 -1000 1000 -916
-1000 977 -997 1000
983 -894 1000 -1000
-996 975 -1000 1000
982 -1000 1000 -857
-999 1000 -1000 992
-1000 915 -999 1000
998 -1000 1000 -829
997 -891 100...

output:

2770.24870093776
2737.64355307349
2809.76695675434
2785.91507156638
2775.02477987208
2768.91716718379
2738.62029859687
2776.29235614985
2756.78221276057
2744.38098898155
2733.38446243115
2776.43194048663
2768.51135475680
2769.79602399178
2785.98838059674
2771.46940133778
2794.05403398464
2794.962456...

result:

ok 100000 numbers

Test #60:

score: 0
Accepted
time: 1276ms
memory: 4168kb

input:

100000
-1000 120 -997 1000
1000 -707 999 -1000
1000 -1000 993 -136
-1000 1000 -984 -975
-980 -471 -1000 1000
1000 -1000 991 -338
-1000 1000 -997 210
1000 -1000 999 -737
1000 -817 996 -1000
-1000 314 -985 1000
-1000 85 -986 1000
997 -1000 1000 -804
999 -978 1000 -1000
-988 737 -1000 1000
-1000 844 -9...

output:

2457.28965160837
2154.85436877542
2233.86430610459
2490.10195897520
2537.68212242398
2470.18435260157
2725.28874176604
2761.14521821885
2489.23923022416
2388.41222542131
2196.49093417344
2367.31400725860
2591.02215943371
2164.50185453344
2194.04710073373
2316.19779245567
2287.02063685345
2811.819569...

result:

ok 100000 numbers

Test #61:

score: 0
Accepted
time: 1248ms
memory: 4140kb

input:

100000
973 1000 1000 861
-1000 -964 -993 -1000
961 1000 1000 842
-1000 -923 -981 -1000
-967 -1000 -1000 -999
1000 996 869 1000
950 1000 1000 871
-1000 -951 -981 -1000
1000 989 806 1000
-1000 -997 -947 -1000
-980 -1000 -1000 -977
933 1000 1000 923
-967 -1000 -1000 -965
1000 913 918 1000
-993 -982 -10...

output:

2755.21328952607
2725.93164882090
2769.39861956169
2741.65236722155
2737.75168094525
2762.48682878874
2744.88796899828
2746.70710168583
2774.84164793606
2693.13108665791
2754.48162410058
2776.59220585052
2825.24555718723
2780.88861946994
2675.74175233656
2722.85487369193
2814.99252586919
2744.018661...

result:

ok 100000 numbers

Test #62:

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

input:

100000
-906 -623 -1000 -1000
999 996 1000 1000
1000 643 978 1000
-899 -1000 -1000 639
1000 899 977 1000
-1000 -416 -867 -1000
-802 -1000 -1000 525
953 1000 1000 638
991 1000 1000 800
-941 -1000 -1000 311
1000 1000 910 447
-1000 -1000 -813 149
962 773 1000 1000
-811 129 -1000 -1000
-1000 171 -839 -10...

output:

2662.76588308487
2227.05827060137
2542.72410718777
2195.60514445917
2350.62932933282
2206.01222462781
2316.31489158727
2375.81990368764
2549.53834672559
2300.51630906161
2333.09388009474
2257.76431198702
2412.07408807715
2304.30048789485
2290.51147277027
2404.89284717281
2388.51342080065
2433.526066...

result:

ok 100000 numbers

Test #63:

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

input:

100000
-965 1000 -1000 747
917 -1000 1000 -400
1000 111 864 -1000
-1000 469 -935 1000
1000 -1000 -982 43
-333 649 -1000 1000
1000 -1000 -981 -889
-1000 1000 -768 987
-247 812 -1000 1000
1000 -1000 -510 -623
-1000 368 -621 1000
239 -1000 1000 269
-343 816 -1000 1000
-996 -441 1000 -1000
-1000 1000 -8...

output:

2503.95879563780
2259.22279188018
1533.10376678024
2194.88930252708
1963.49326141904
1835.23106201008
1835.07435342569
1776.55788481278
2201.85870423263
1616.66877684212
1833.79880229453
2654.47845299778
2726.69196538154
2127.96592264026
1889.17219812772
1759.92065563085
2183.51329410064
2548.047709...

result:

ok 100000 numbers

Test #64:

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

input:

100000
228 1000 602 -1000
-836 -1000 -610 1000
-447 1000 920 -1000
102 -1000 -230 1000
-647 1000 961 -1000
640 -1000 221 1000
742 1000 -518 -1000
999 1000 469 -1000
-60 1000 -814 -1000
-330 1000 -534 -1000
-473 1000 356 -1000
103 -1000 139 1000
-961 -1000 212 1000
656 -1000 -544 1000
436 1000 -434 -...

output:

1377.80329671418
838.65960970442
858.80679523145
1008.39706310397
708.53907799219
750.59623768799
953.73483453262
1065.27311163756
1112.26542621798
800.38463663984
851.90614645347
803.80929457893
1031.14767457096
891.03671607878
1060.53588134314
970.97362057998
883.32316830534
915.17800167335
701.02...

result:

ok 100000 numbers

Test #65:

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

input:

100000
-537 1000 227 -1000
-1000 -347 1000 931
895 1000 -716 -1000
1000 712 -1000 154
-931 1000 568 -1000
-1000 854 1000 732
162 1000 -694 -1000
1000 -987 -1000 242
953 -1000 858 1000
1000 918 -1000 721
1000 -542 -1000 968
540 1000 -238 -1000
-1000 -46 1000 689
-75 1000 -615 -1000
1000 227 -1000 -62...

output:

902.34778294400
937.52892324536
1134.57157699240
942.52762385787
1363.43572492316
910.79448578622
868.44978386179
992.10929950809
916.39803631994
889.33840192766
903.11908840656
950.22091739215
818.14249546617
979.22658712521
889.85346052129
894.16628157515
886.93413357598
1026.13245267211
777.24884...

result:

ok 100000 numbers

Test #66:

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

input:

7
-1000 -1000 1000 1000
-1000 -1000 1000 1000
-1000 -1000 1000 1000
-1000 -1000 1000 999
-1000 -1000 1000 1000
-999 -1000 1000 999
-1000 -1000 1000 1000
-1000 1000 1000 -1000
-1000 -1000 -1000 1000
1000 -1000 1000 1000
-1000 -1000 -1000 -999
1000 999 1000 1000
-999 -1000 -1000 -999
1000 999 999 1000

output:

942.80904158206
942.69176436923
942.57489888841
1082.15016047154
2153.27146579030
2827.72012111789
2827.01297013886

result:

ok 7 numbers

Test #67:

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

input:

1
-1000 -1000 1000 1000
-1000 1000 1000 -1000

output:

1082.15016047154

result:

ok found '1082.150160472', expected '1082.150160093', error '0.000000000'

Extra Test:

score: 0
Extra Test Passed