QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#31777#21645. 是男人就得80分问题Suzt_ilymtics#10 3ms5956kbC++1011b2022-05-12 16:01:592022-05-12 16:02:01

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-12 16:02:01]
  • 评测
  • 测评结果:10
  • 用时:3ms
  • 内存:5956kb
  • [2022-05-12 16:01:59]
  • 提交

answer

#include<bits/stdc++.h>
#define LL long long 
#define int long long
#define orz cout << "tyy YYDS!!!\n"
using namespace std;
const int MAXN = 2e5 + 10;
const int INF = 1e9 + 7;
const int mod = 998244353;

int read() {
	int s = 0, f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= (ch == '-'), ch = getchar();
	while(isdigit(ch)) s = (s << 1) + (s << 3) + (ch ^ 48), ch = getchar();
	return f ? -s : s;
}

int n, m;
double ans, res;
double x[MAXN], y[MAXN];

double Calc(int i, int j) {
	return sqrt((x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j]));
}

signed main() {
	n = read();
	for(int i = 1; i <= 3; ++i) cin >> x[i] >> y[i];
	ans = max(Calc(1, 2), max(Calc(2, 3), Calc(1, 3)));
	m = read();
	for(int i = 1; i <= 3; ++i) cin >> x[i] >> y[i];
	res = max(Calc(1, 2), max(Calc(2, 3), Calc(1, 3)));
//	cout << ans << " " << res << "\n";
//	cout << Calc(1, 2) << " " << Calc(2, 3) << " " << Calc(1, 3) << "\n";
	printf("%.6lf\n", min(ans, res));
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
40 0
0 0
0 30
3
10 0
0 -40
-10 0

output:

41.231056

result:

ok found '41.23106', expected '41.23106', error '0.00000'

Test #2:

score: 0
Wrong Answer
time: 3ms
memory: 5956kb

input:

4
-20 0
0 20
20 0
0 -20
4
15 15
15 -15
-15 -15
-15 15

output:

39.824616

result:

wrong answer 1st numbers differ - expected: '28.28427', found: '39.82462', error = '0.40801'

Test #3:

score: 0
Wrong Answer
time: 3ms
memory: 3912kb

input:

8
0 0
0 1
1 100
1 1
2 100
2 1
3 100
3 0
8
100 0
99 0
0 1
99 1
0 2
99 2
0 3
100 3

output:

99.005050

result:

wrong answer 1st numbers differ - expected: '495.01515', found: '99.00505', error = '0.80000'

Test #4:

score: 0
Wrong Answer
time: 3ms
memory: 3772kb

input:

8
0 0
50 0
50 -10
30 -10
30 -50
20 -50
20 -10
0 -10
8
0 50
50 100
70 80
40 50
50 40
80 70
100 50
50 0

output:

41.231056

result:

wrong answer 1st numbers differ - expected: '75.85786', found: '41.23106', error = '0.45647'

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 3724kb

input:

11
0 24
6 60
12 24
18 48
24 18
30 36
36 24
48 72
48 24
36 0
12 0
19
-60 -50
-60 46
60 70
48 12
48 34
-16 34
0 46
-24 34
12 16
-36 10
0 4
-24 -2
-12 -8
-48 -2
0 -26
40 -6
41 -5
48 10
96 -14

output:

30.594117

result:

wrong answer 1st numbers differ - expected: '49.47727', found: '30.59412', error = '0.38165'

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 3716kb

input:

16
-1 2
0 1
1 2
1 1
2 1
1 0
2 -1
1 -1
1 -2
0 -1
-1 -2
-1 -1
-2 -1
-1 0
-2 1
-1 1
16
5 40
20 30
30 20
40 5
40 -5
30 -20
20 -30
5 -40
-5 -40
-20 -30
-30 -20
-40 -5
-40 5
-30 20
-20 30
-5 40

output:

1.414214

result:

wrong answer 1st numbers differ - expected: '0.00000', found: '1.41421', error = '1.41421'

Test #7:

score: 0
Wrong Answer
time: 0ms
memory: 3824kb

input:

11
6 0
4 0
0 10
0 20
10 20
20 22
20 -50
15 -50
14 -17
15 10
10 10
11
6 0
4 0
0 10
0 20
15 30
30 35
27 -7
20 -50
20 24
10 20
10 10

output:

10.198039

result:

wrong answer 1st numbers differ - expected: '54.00000', found: '10.19804', error = '0.81115'

Test #8:

score: 0
Wrong Answer
time: 3ms
memory: 5824kb

input:

11
0 0
-50 0
-50 10
-49 10
-49 3
-20 3
-20 4
49 4
49 10
50 10
50 1
6
0 0
0 1
60 61
61 61
61 60
1 0

output:

29.832868

result:

wrong answer 1st numbers differ - expected: '68.29289', found: '29.83287', error = '0.56316'

Test #9:

score: 0
Wrong Answer
time: 3ms
memory: 5764kb

input:

50
0 10
2 11
4 10
6 11
8 10
10 11
12 10
14 11
16 10
18 11
20 10
22 11
24 10
26 11
28 10
30 11
32 10
34 11
38 10
40 11
42 10
44 11
48 10
49 11
49 0
47 1
45 0
43 1
41 0
39 1
37 0
35 1
33 0
31 1
29 0
25 1
23 0
21 1
19 0
17 1
15 0
13 1
11 0
9 1
7 0
6 1
5 0
3 1
1 0
0 0
50
0 10
2 11
4 10
6 11
8 10
10 11
1...

output:

4.000000

result:

wrong answer 1st numbers differ - expected: '29.06888', found: '4.00000', error = '0.86240'

Test #10:

score: 0
Wrong Answer
time: 0ms
memory: 3780kb

input:

49
-25 -10
-24 -23
-32 -9
-29 -48
-39 -68
-22 -79
-24 -53
-16 -82
13 -94
9 -42
9 -27
5 -30
4 -57
-7 -54
-16 -32
-20 20
-11 18
-6 -47
-6 -52
2 -56
3 -29
13 -24
15 -35
19 -87
21 -88
17 -36
60 15
33 11
31 37
32 59
21 52
25 0
-5 -10
-7 16
13 41
-17 51
-20 90
-39 77
-35 25
-40 35
-37 -4
-44 77
-19 92
33 ...

output:

16.124515

result:

wrong answer 1st numbers differ - expected: '430.95359', found: '16.12451', error = '0.96258'