QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#426078#3854. RadarSSAABBEERRWA 167ms9348kbC++203.7kb2024-05-30 20:52:552024-05-30 20:52:57

Judging History

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

  • [2024-05-30 20:52:57]
  • 评测
  • 测评结果:WA
  • 用时:167ms
  • 内存:9348kb
  • [2024-05-30 20:52:55]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define pii pair<int, int>
#define rep(x,a,b) for(int x=a;x<=b;x++)
#define pre(x,a,b) for(int x=a;x>=b;x--)
#define endl "\n"
const int mod=1e9+7;
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
const int N = 2e5 + 60;
int n, m, k;
double pi = acos(-1);
struct node
{
	double x, y, z;
}p[N];
double c(node a)
{
	double res = atan2(a.y, a.x);
	if(a.y < 0) res += pi * 2;
	return res;
}
bool cmp(node a, node b)
{
	return a.z < b.z;
}
double rr[N];
int g(double x)
{
	int l = 1, r = m;
	if(p[m].z < x) return 1;
	while(r - l > 1)
	{
		int mid = l + r >> 1;
		if(p[mid].z >= x) r = mid;
		else l = mid;
	}
	if(p[l].z >= x) r = l;
	return r;
}
double dis(node a, node b)
{
	return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double ddis(node a, node b)
{
	return ((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
void solve()
{
	cin >> n >> m >> k;
	rep(i, 1, n) cin >> rr[i];
	sort(rr + 1, rr + n + 1);
	rep(i, 1, m)
	{
		cin >> p[i].x >> p[i].y, p[i].z = c(p[i]);
	}
	sort(p + 1, p + m + 1, cmp);
	// rep(i, 1, m)cout<<p[i].x<<" "<<p[i].y<<endl;
	node f = {0, 0};
	rep(i, 1, k)
	{
		node s;
		cin >> s.x >> s.y;
		s.z = c(s);
		int id = g(s.z);
		double ans = 1e18, xx = 0, yy = 0;
		if((p[id].y / p[id].x) == s.y / s.x)
		{
			int ff = lower_bound(rr + 1, rr + n + 1, dis(s, f)) - rr;
			yy = rr[ff] / (dis(p[id], f)) * p[id].y;
			xx = rr[ff] / (dis(p[id], f)) * p[id].x;
			node d = {xx, yy};
			ans = min(ans, dis(d, s));
			ff -- ;
			if(ff)
			{
				yy = rr[ff] / (dis(p[id], f)) * p[id].y;
				xx = rr[ff] / (dis(p[id], f)) * p[id].x;
				node d = {xx, yy};
				ans = min(ans, dis(d, s));
			}
		}
		else
		{
			int l = 1, r = n;
			while(r - l > 1)
			{
				int mid = l + r >> 1;
				yy = rr[mid] / (dis(p[id], f)) * p[id].y;
				xx = rr[mid] / (dis(p[id], f)) * p[id].x;
				// cout<<xx<<" "<<yy<<endl;
				node d = {xx, yy};
				if(ddis(f, d) + ddis(d, s) < ddis(f, s)) l = mid;
				else r = mid;
			}
			yy = rr[l] / (dis(p[id], f)) * p[id].y;
			xx = rr[l] / (dis(p[id], f)) * p[id].x;
			node d = {xx, yy};
			ans = min(ans, dis(d, s));
			if(l < n)
			{
				l ++ ;
				yy = rr[l] / (dis(p[id], f)) * p[id].y;
				xx = rr[l] / (dis(p[id], f)) * p[id].x;
				//cout<<xx<<" "<<yy<<endl;
				d = {xx, yy};
				ans = min(ans, dis(d, s));
			}
		}
		if(m == 1)
		{
			printf("%.12lf\n", ans);
			continue;
		}
			id -- ;
			if(id == 0) id = m;
			if((p[id].y / p[id].x) == s.y / s.x)
			{
				int ff = lower_bound(rr + 1, rr + n + 1, dis(s, f)) - rr;
				yy = rr[ff] / (dis(p[id], f)) * p[id].y;
				xx = rr[ff] / (dis(p[id], f)) * p[id].x;
				node d = {xx, yy};
				ans = min(ans, dis(d, s));
				ff -- ;
				if(ff)
				{
					yy = rr[ff] / (dis(p[id], f)) * p[id].y;
					xx = rr[ff] / (dis(p[id], f)) * p[id].x;
					node d = {xx, yy};
					ans = min(ans, dis(d, s));
				}
			}
			else
			{
				xx = 0, yy = 0;
				int l = 1, r = n;
				while(r - l > 1)
				{
					int mid = l + r >> 1;
					yy = rr[mid] / (dis(p[id], f)) * p[id].y;
					xx = rr[mid] / (dis(p[id], f)) * p[id].x;
					node d = {xx, yy};
					if(ddis(f, d) + ddis(d, s) < ddis(f, s)) l = mid;
					else r = mid;
				}
				yy = rr[l] / (dis(p[id], f)) * p[id].y;
				xx = rr[l] / (dis(p[id], f)) * p[id].x;
				node d = {xx, yy};
				ans = min(ans, dis(d, s));
				if(l < n)
				{
					l ++ ;
					yy = rr[l] / (dis(p[id], f)) * p[id].y;
					xx = rr[l] / (dis(p[id], f)) * p[id].x;
					d = {xx, yy};
					ans = min(ans, dis(d, s));
				}
			}
			printf("%.12lf\n", ans);		
	}
}
signed main()
{
	IOS;
	int t;
	t = 1;
	// cin >> t;
	while(t -- )
	solve();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 8 4
2
4
7
1 0
2 1
0 1
-1 1
-5 -2
-5 -6
-2 -7
6 -1
-1 -1
3 1
-5 -3
8 1

output:

0.605291072917
0.977772290466
1.551845105402
1.414213562373

result:

ok 4 numbers

Test #2:

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

input:

1 8 32
7
0 1
1 0
0 -1
-1 0
1 -1
-1 1
-1 -1
1 1
20 10
10 20
-20 10
10 -20
-10 20
20 -10
-10 -20
-20 -10
2 1
1 2
-2 1
1 -2
-1 2
2 -1
-1 -2
-2 -1
5 0
0 5
-5 0
0 -5
5 5
5 -5
-5 5
-5 -5
9 0
0 9
-9 0
0 -9
9 9
9 -9
-9 9
-9 -9

output:

15.874985099258
15.874985099258
15.874985099258
15.874985099258
15.874985099258
15.874985099258
15.874985099258
15.874985099258
4.929656701046
4.929656701046
4.929656701046
4.929656701046
4.929656701046
4.929656701046
4.929656701046
4.929656701046
2.000000000000
2.000000000000
2.000000000000
2.00000...

result:

ok 32 numbers

Test #3:

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

input:

3 4 1681
16
8
4
-1 0
0 -1
0 1
1 0
-9 17
-4 -7
2 -13
-11 -17
15 -19
-7 1
-8 14
-8 -7
-8 20
-16 -3
12 14
-3 12
9 -5
-18 11
3 -1
2 0
-18 0
0 -19
-1 -19
18 -8
2 20
5 -8
-8 -19
-9 -16
20 -19
14 -1
3 10
-1 -4
4 10
16 17
19 -7
-17 4
1 -12
-5 -12
-5 -10
-15 -5
-10 -19
-2 -10
-4 -16
-2 4
-14 8
-17 16
4 1
16 ...

output:

9.055385138137
4.123105625618
3.605551275464
11.045361017187
15.297058540778
1.414213562373
8.246211251235
7.000000000000
8.944271909999
3.000000000000
12.165525060596
5.000000000000
5.099019513593
11.180339887499
1.414213562373
2.000000000000
2.000000000000
3.000000000000
3.162277660168
8.246211251...

result:

ok 1681 numbers

Test #4:

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

input:

3 4 1681
16
8
4
-1 -1
1 -1
-1 1
1 1
17 1
13 7
-13 -18
-1 18
4 -12
-9 3
5 10
-10 1
-12 -4
14 10
-18 19
0 -3
-7 3
-16 11
-15 9
16 1
-8 -12
3 1
0 -2
15 -18
-14 20
9 -19
17 12
20 5
-3 -6
12 -1
9 10
-13 -9
-20 -15
-11 6
17 -2
-10 -19
15 -8
-6 17
18 15
2 -3
18 -12
8 -3
-11 -6
19 -15
20 0
3 4
2 -16
-6 -17
...

output:

11.777372119304
4.631593682590
6.895656100977
12.291422905367
6.555964003581
4.270304206047
4.392536000448
6.367825885745
6.555964003581
2.990316379371
10.187520359495
2.833626166509
2.977064831365
4.696779860162
4.352239888693
11.328455809797
3.384030147710
1.836459365744
2.947251516416
7.635131895...

result:

ok 1681 numbers

Test #5:

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

input:

1 4 16
7
0 1
1 0
0 -1
-1 0
3 0
0 3
-3 0
0 -3
3 3
3 -3
-3 3
-3 -3
8 0
0 8
-8 0
0 -8
8 8
8 -8
-8 8
-8 -8

output:

4.000000000000
4.000000000000
4.000000000000
4.000000000000
5.000000000000
5.000000000000
5.000000000000
5.000000000000
1.000000000000
1.000000000000
1.000000000000
1.000000000000
8.062257748299
8.062257748299
8.062257748299
8.062257748299

result:

ok 16 numbers

Test #6:

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

input:

30 4 120
128
1
2
256
4
512
1024
2048
8
4096
32768
131072
262144
524288
8192
268167
16
536334
16384
1047
32
2095
8380
64
134083
65536
4190
67041
33520
16760
536334 0
-536335 0
0 536334
0 -536335
-1 1
-2 2
-4 4
-8 8
-16 16
-32 32
-64 64
-128 128
-256 256
-512 512
-1024 1024
-2048 2048
-4096 4096
-8192...

output:

1.000000000000
2.000000000000
4.000000000000
8.000000000000
16.000000000000
32.000000000000
64.000000000000
128.000000000000
256.000000000000
512.000000000000
1024.000000000000
2048.000000000000
4096.000000000000
8192.000000000000
16384.000000000000
32768.000000000000
65536.000000000000
131072.00000...

result:

ok 120 numbers

Test #7:

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

input:

4 4 1681
1000
1
999000
999
999000 999000
-999001 999000
999000 -999001
-999001 -999001
9 2
-17 -3
15 3
-19 -6
-6 -16
19 6
-12 -16
1 4
4 12
4 -15
-1 -17
5 7
12 13
19 -19
6 -16
-9 -19
6 -10
1 -20
18 17
-2 -20
13 -13
2 -7
13 14
-15 -7
7 -2
-3 4
-15 11
13 -15
20 -20
13 5
14 -5
13 11
20 0
-4 18
-2 -2
-18...

output:

8.393071595900
16.453441243477
14.475640085236
19.043231368144
16.182932417451
19.043231368144
19.010576536590
3.305893553661
11.763187620795
14.667308360056
16.295525639797
7.617705510948
16.692652903019
25.870057685089
16.182932198760
20.084870431585
10.694511684541
19.295116007469
23.759261884935...

result:

ok 1681 numbers

Test #8:

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

input:

3 3 108
8
16
4
0 1
0 -1
-1 0
0 0
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
0 11
0 12
0 13
0 14
0 15
0 16
0 17
0 18
0 19
0 0
0 -1
0 -2
0 -3
0 -4
0 -5
0 -6
0 -7
0 -8
0 -9
0 -10
0 -11
0 -12
0 -13
0 -14
0 -15
0 -16
0 -17
0 -18
0 -19
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16...

output:

4.000000000000
3.000000000000
2.000000000000
1.000000000000
0.000000000000
1.000000000000
2.000000000000
1.000000000000
0.000000000000
1.000000000000
2.000000000000
3.000000000000
4.000000000000
3.000000000000
2.000000000000
1.000000000000
0.000000000000
1.000000000000
2.000000000000
3.000000000000
...

result:

ok 108 numbers

Test #9:

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

input:

3 3 1681
8
16
4
-1 0
0 1
0 -1
9 2
-17 -3
15 3
-19 -6
-6 -16
19 6
-12 -16
1 4
4 12
4 -15
-1 -17
5 7
12 13
19 -19
6 -16
-9 -19
6 -10
1 -20
18 17
-2 -20
13 -13
2 -7
13 14
-15 -7
7 -2
-3 4
-15 11
13 -15
20 -20
13 5
14 -5
13 11
20 0
-4 18
-2 -2
-18 7
6 -3
-9 -9
-8 -12
-16 20
-1 -13
14 20
-7 -14
13 -14
19...

output:

9.219544457293
3.162277660168
15.033296378373
6.708203932499
6.000000000000
19.104973174543
12.000000000000
1.000000000000
5.656854249492
4.123105625618
1.414213562373
5.099019513593
12.369316876853
19.235384061671
6.000000000000
9.486832980505
6.324555320337
4.123105625618
18.027756377320
4.4721359...

result:

ok 1681 numbers

Test #10:

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

input:

3 2 1681
16
8
4
0 1
0 -1
-1 -17
-18 -12
4 -6
12 17
-14 -11
-10 19
-19 -15
-15 -17
2 13
-8 -13
-18 7
-17 12
-20 16
3 12
-13 13
10 5
18 -9
-16 4
1 17
-19 -6
-17 -4
12 -18
-10 -17
-9 -20
13 6
11 0
4 5
2 -15
8 -12
1 9
17 -10
1 -13
-8 1
-12 11
5 0
20 -16
-5 8
-13 -2
7 12
-8 14
-4 9
10 -11
19 -3
-18 8
-4 ...

output:

1.414213562373
18.439088914586
4.472135955000
12.041594578792
14.317821063276
10.440306508911
19.026297590440
15.033296378373
3.605551275464
8.544003745318
18.027756377320
17.464249196573
20.000000000000
5.000000000000
13.341664064126
10.049875621121
18.027756377320
16.000000000000
1.414213562373
19...

result:

ok 1681 numbers

Test #11:

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

input:

3 2 1681
16
8
4
-1 -999001
0 1
13 -1
-7 19
19 -13
17 -1
-14 14
18 -9
10 -10
11 20
6 16
-16 7
14 -7
-3 4
7 -14
-20 2
14 -6
13 16
-16 -13
2 0
-8 20
-3 20
0 14
-18 1
-15 12
-3 -12
-13 -14
14 0
12 4
-14 9
-10 -9
20 15
-20 0
19 4
16 -8
3 -14
19 -15
-11 19
6 -9
-17 -5
-17 13
18 12
6 12
-16 -10
12 7
8 -6
-...

output:

13.341667965588
7.615773105864
19.235399881682
17.262680444705
14.142135623731
18.027764372991
10.198046879677
11.704699910720
6.000000000000
16.031219541881
14.035676835267
3.000000000000
7.280125289047
20.099751242242
14.142139587489
13.000000000000
16.278804854418
4.472135955000
8.944271909999
5....

result:

ok 1681 numbers

Test #12:

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

input:

3 2 1
1
2
4
0 1
0 -1
-7 0

output:

7.071067811865

result:

ok found '7.0710678', expected '7.0710678', error '0.0000000'

Test #13:

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

input:

3 2 1
1
2
4
0 1
-1 -999001
-7 0

output:

7.071066820926

result:

ok found '7.0710668', expected '7.0710668', error '0.0000000'

Test #14:

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

input:

4 1 36
8
1
2
4
0 1
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 -1
0 -2
0 -3
0 -4
0 -5
0 -6
0 -7
0 -8
0 -9
-1 0
-2 0
-3 0
-4 0
-5 0
-6 0
-7 0
-8 0
-9 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0

output:

0.000000000000
0.000000000000
1.000000000000
0.000000000000
1.000000000000
2.000000000000
1.000000000000
0.000000000000
1.000000000000
2.000000000000
3.000000000000
4.000000000000
5.000000000000
6.000000000000
7.000000000000
8.000000000000
9.000000000000
10.000000000000
1.414213562373
2.236067977500...

result:

ok 36 numbers

Test #15:

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

input:

4 5 8
8
1
2
4
0 1
1 1
1 -1
-3 2
-2 -5
-4 0
-4 -1
-4 -2
-8 -1
-8 -2
-8 -3
-8 -4
-9 -3

output:

2.318273189507
3.147379239224
3.043003664557
5.601139657638
6.294758478447
6.553438496857
6.086007329113
7.480164533118

result:

ok 8 numbers

Test #16:

score: 0
Accepted
time: 166ms
memory: 9048kb

input:

99999 99999 99999
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730...

output:

10.998865701869
14.525423018761
21.073102117794
31.843189113241
115.924895013616
49.991391054940
60.506629716442
69.958130039586
134.902308151242
90.172561431423
100.220151411668
110.154852885070
119.838138057650
169.259259924831
139.857713809972
149.903862612096
159.813034019318
169.924008912966
20...

result:

ok 99999 numbers

Test #17:

score: 0
Accepted
time: 165ms
memory: 9116kb

input:

99999 99999 99999
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730...

output:

10.000000000000
15.295841308968
21.472081503159
30.839308519800
35.006555272524
50.931458107477
60.506619828998
70.363795442202
80.007038937116
90.056171321627
100.000633293052
110.050508279774
119.838128085721
129.885197989282
134.868076476159
149.833874636269
159.950469676917
169.923998940019
174....

result:

ok 99999 numbers

Test #18:

score: 0
Accepted
time: 167ms
memory: 9348kb

input:

99999 99999 99999
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730...

output:

10.000000000000
11.793537328942
15.006851569379
30.316874089052
40.113906820859
50.140933717450
60.175584315259
70.363795442202
80.125534801392
89.856351459773
100.000633293052
109.955169614314
119.767282240876
129.812131979222
139.932670846876
149.713860056673
159.753646614700
169.738741224847
179....

result:

ok 99999 numbers

Test #19:

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

input:

3 3 1781
27448
700036
1565
727561 561893
946824 -149222
20811 -112456
-864128 96532
16 -3
-17 6
-20 20
-13 -9
3 1
6 6
-18 -10
-10 0
-4 2
19 -11
-3 18
9 -6
-14 -5
-17 1
-16 -7
20 6
20 10
0 -8
-15 20
-12 17
-8 -13
14 -8
-14 -4
20 -12
-11 0
-7 13
1 -4
-1 17
20 4
-17 12
-3 -4
8 3
-9 -9
-11 14
-12 14
-13...

output:

869958.248114477028
1548.728110911665
1574.070850191948
1568.855156609635
1558.582578139036
1562.014764098693
1556.584271779073
1558.564638007551
1566.850548158156
1566.948507823863
1544.539412209167
1556.455197783836
1555.182232268123
1562.699966582057
1569.163895394819
1561.121016860295
1545.52168...

result:

ok 1781 numbers

Test #20:

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

input:

2 2 1781
455464
989237
648422 -984508
-86934 -353141
15 -8
12 -16
-20 -3
-5 15
6 -9
19 -16
-16 5
6 6
3 16
-2 -4
-19 -5
-1 -5
5 -11
0 1
9 9
5 13
3 -15
10 -17
16 -20
2 15
9 -2
0 5
18 -6
-20 18
3 -8
-7 -2
13 -8
15 -13
885672 69814
893942 -786043
13 1
2 7
15 20
-12 -2
679345 587036
-20 8
-9 -9
0 17
15 -...

output:

455449.068343449326
455444.037305271020
455456.306609651423
455477.370048753859
455453.183515037643
455440.187062228506
455465.030764936353
455465.710642614693
455475.712201902759
455459.637885071163
455454.603568764112
455458.905910793052
455452.063287644181
455464.835137115675
455466.566020792641
...

result:

ok 1781 numbers

Test #21:

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

input:

4 4 1781
284368
639066
544427
453079
-473316 -385890
-403701 -456998
341400 289506
328542 749626
-11 0
15 -5
18 -15
4 18
-12 -15
-2 9
3 -20
-5 0
-5 8
14 -8
-247884 -376851
-14 -7
-2 19
18 5
4 -17
-17 10
-5 14
7 -6
4 0
13 -14
6 7
-17 19
2 20
-17 2
-18 -6
-14 -13
-2 17
16 -9
8 -13
12 5
850219 294605
2...

output:

284359.474486080813
284359.793732645165
284363.973878313438
284349.908226094150
284348.813509705709
284360.559810770268
284354.997431616997
284364.124745337409
284362.680004575523
284362.496790819510
64050.720210684543
284352.725997149013
284351.400949598872
284351.037832076894
284357.907791704172
2...

result:

ok 1781 numbers

Test #22:

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

input:

5 5 1781
855105
811761
393138
763609
395482
485837 -963055
-805058 420348
-996068 26540
957233 158478
40565 268210
19 -11
16 9
-8 -7
-15 -2
10 0
-19 -1
-5 4
-14 5
20 6
-10 -16
10 -1
-17 -6
16 -19
11 -20
-11 -20
7 -5
9 -16
7 -10
388718 -210265
-7 -12
1 6
-4 -7
-11 15
-4 -11
5 16
-1 -17
-15 9
-2 1
17 ...

output:

393119.621394643036
393120.744903681683
393130.189351588720
393123.058599690616
393128.134296897391
393119.033379073080
393131.716431363777
393123.275621858716
393117.288585386123
393128.219226072019
393128.297637329670
393121.165896118269
393113.829886579246
393115.189056911913
393125.098459256231
...

result:

ok 1781 numbers

Test #23:

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

input:

4 4 1781
360226
923659
843797
234702
385835 56098
-255808 -788591
-223435 302545
-943925 -181801
-1 -5
0 -16
7 -8
-13 0
-14 -17
0 17
-5 10
-14 -13
-4 -1
-14 -12
-19 0
-3 9
19 -20
-11 -13
746464 508236
-244133 857457
-9 -18
0 -6
8 12
-15 -18
-552127 -210744
-7 -1
-7 13
13 -18
-16 -18
3 10
8 11
2 0
18...

output:

234696.935415039392
234686.780762982729
234696.224052096833
234689.234624189150
234681.509833541262
234688.325222284358
234690.985530420876
234685.314701468771
234697.883062973619
234685.983333384647
234683.342920964380
234692.978097465035
234686.076394613978
234686.240279400459
396836.114925302099
...

result:

ok 1781 numbers

Test #24:

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

input:

2 2 1781
724290
427620
585285 -84915
-522957 846042
2 -4
5 -13
18 14
-5 -11
-18 4
9 12
6 9
-13 18
14 18
-2 19
17 6
17 10
5 -20
0 -7
-3 -7
-3 20
-7 11
-11 -14
7 -8
17 -5
-8 -19
-6 13
17 15
5 12
4 -18
-2 11
0 12
0 1
3 -8
11 6
-8 19
-10 11
-15 -8
-6 -18
20 -18
16 -16
16 2
-19 -10
-13 -12
-2 14
5 -18
-2...

output:

427617.446418637177
427613.185439975059
427604.196937802481
427623.368971969583
427607.133601538895
427612.816413233115
427615.354498480097
427597.853682650079
427608.729955872463
427602.786779337795
427604.037703262526
427604.612118823978
427612.180633454642
427618.994996686000
427621.963920057169
...

result:

ok 1781 numbers

Test #25:

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

input:

4 4 1781
509841
4372
912999
543071
445967 -716460
-693896 -395076
-734650 644244
-86759 -207195
-14 -17
1 -4
9 -5
-20 -7
12 4
0 17
0 19
2 -8
10 11
-10 1
-14 -6
-13 -1
-3 11
-8 -11
-10 11
-13 5
4 -14
-977857 62664
-16 0
5 -11
-19 -7
-1 -11
9 -11
-20 13
-1 8
-2 5
10 19
19 0
20 -9
-20 -20
6 -2
17 -6
-5...

output:

4350.916516885703
4368.075870665846
4363.002009875001
4351.157856369777
4369.071821570437
4360.810115602476
4359.496128618513
4364.152108232065
4372.291164919348
4363.808491637304
4356.865406077191
4360.211548211098
4362.496344194204
4358.764831637725
4357.229155238039
4358.931910459638
4358.0025208...

result:

ok 1781 numbers

Test #26:

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

input:

1 1 1781
730978
522802 -441174
-7 19
-5 -12
13 -4
12 17
-4 -16
-18 13
5 -6
-15 11
13 -10
1 -1
12 -14
-2 0
13 4
20 14
-3 18
-6 1
873868 299053
-13 7
-14 -5
5 20
12 4
-6 -4
-12 14
-1 -10
-9 10
-13 -12
-18 6
11 -4
13 13
11 14
-3 16
14 -4
13 0
14 19
-18 4
4 -19
19 -16
-6 11
-20 17
-3 13
-10 8
857606 -57...

output:

730995.603325437522
730974.082282885211
730965.485102324048
730979.792987545952
730970.738391330699
731000.140459052520
730970.309227254125
730996.557869047974
730961.615551213850
730976.590829609777
730959.800117169390
730979.528497912805
730970.644548550481
730971.744321334641
730991.901436980930
...

result:

ok 1781 numbers

Test #27:

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

input:

1 1 1781
372082
-541795 -869565
281973 459007
739644 385456
1 18
-14 16
-17 10
19 -13
-14 -20
19 -3
-6 -11
-17 5
-3 -10
-5 4
17 -3
-11 -16
-7 -19
-11 14
-8 5
8 0
-1 -3
11 -12
-9 13
-2 11
-11 -11
12 20
-9 -20
-12 -11
541236 905488
19 16
-9 -14
9 12
-18 17
3 20
16 8
-15 14
-20 17
-4 -4
14 -1
1 -2
-17 ...

output:

910776.206267791917
1169879.348474515136
372097.806162880792
372088.176890145056
372081.497990245698
372081.014669749246
372057.621846727096
372089.501738643216
372069.491004181677
372077.254180424847
372071.926200643007
372082.750912222662
372088.444027551042
372062.603239993099
372062.172322481230...

result:

ok 1781 numbers

Test #28:

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

input:

4 4 1781
8
4
5
6
-7 -2
5 10
1 5
-5 3
14 -16
-17 8
10 3
10 1
-17 -1
-7 -10
-8 5
-20 -12
20 11
16 5
7 -20
10 8
-3 12
17 4
1 16
2 -14
10 -13
-4 12
-4 -11
-11 2
1 -13
-5 -11
9 -20
1 15
5 15
-11 13
2 4
-19 2
10 12
-12 8
19 -1
-14 0
-5 6
2 -1
0 13
-5 -2
-9 8
11 9
-2 -15
-4 -8
0 0
-13 -8
-5 -20
64289 -8949...

output:

23.073767740705
10.858474455994
7.649399947186
8.504961407320
9.384559030415
7.832875423537
1.442652097559
15.734226393396
16.866311506196
12.607900073843
21.791970094608
6.477587843636
6.175927845593
13.788203719122
8.175175157812
14.163884242599
18.257900167049
6.948376998709
9.517544937156
4.6494...

result:

ok 1781 numbers

Test #29:

score: -100
Wrong Answer
time: 2ms
memory: 6472kb

input:

2 2 1781
2
6
9 9
4 0
-6 -15
16 -2
-11 2
-955131 926039
-6 5
-9 0
-10 -1
13 -5
-10 12
0 -3
-13 -12
-18 -5
-2 -6
-8 10
13 13
2 16
13 6
-2 2
9 -8
-397859 -12783
-6 14
-7 -8
-1 15
-20 7
-16 -14
54141 265024
15 -19
-18 7
-3 14
-4 16
7 10
-15 15
19 5
0 5
-1 -5
-20 -15
-5 6
10 -19
-7 7
-17 7
19 -15
17 14
3...

output:

17.000000000000
10.198039027186
12.428026557854
1330347.149796098238
8.235801547193
9.000000000000
11.666734691944
8.602325267043
15.567374401308
3.605551275464
19.209372712299
20.446364563637
7.211102550928
12.741394968782
12.384776310850
11.969333116916
8.931945694498
3.464101615138
8.544003745318...

result:

wrong answer 6th numbers differ - expected: '10.5097975', found: '9.0000000', error = '0.1436562'