QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#559356 | #5126. Bellevue | joshua_125 | WA | 14ms | 11000kb | Python3 | 738b | 2024-09-11 21:34:55 | 2024-09-11 21:34:56 |
Judging History
answer
from math import atan, pi
def find_max_slope_west(x, y):
if (y):
return y/x
return 0
def find_max_slope_east(x, y, x_max):
if (y):
return y/(x_max-x)
return 0
n = int(input())
coordinates = [[int(x) for x in input().split()] for _ in range(n)]
max_slope = 0
x_max = 0
for coordinate in coordinates:
if coordinate[0] > x_max:
x_max = coordinate[0]
for coordinate in coordinates:
x = coordinate[0]
y = coordinate[1]
if find_max_slope_west(x, y) > max_slope:
max_slope = find_max_slope_west(x, y)
if (find_max_slope_east(x, y, x_max) > max_slope):
max_slope = find_max_slope_east(x, y, x_max)
max_rad = atan(max_slope)
max_deg = max_rad/pi*180
print(max_deg)
详细
Test #1:
score: 100
Accepted
time: 9ms
memory: 10884kb
input:
6 0 0 2 1 3 1 4 4 5 1 9 0
output:
45.0
result:
ok found '45.0000000', expected '45.0000000', error '0.0000000'
Test #2:
score: 0
Accepted
time: 14ms
memory: 11000kb
input:
5 1 0 5 4 6 1 8 2 9 0
output:
63.43494882292201
result:
ok found '63.4349488', expected '63.4349488', error '0.0000000'
Test #3:
score: 0
Accepted
time: 14ms
memory: 10896kb
input:
3 0 0 1 1 2 0
output:
45.0
result:
ok found '45.0000000', expected '45.0000000', error '0.0000000'
Test #4:
score: 0
Accepted
time: 14ms
memory: 10960kb
input:
3 0 0 1 2 2 0
output:
63.43494882292201
result:
ok found '63.4349488', expected '63.4349488', error '0.0000000'
Test #5:
score: 0
Accepted
time: 14ms
memory: 10844kb
input:
3 0 0 25000 1 50000 0
output:
0.002291831179300983
result:
ok found '0.0022918', expected '0.0022918', error '0.0000000'
Test #6:
score: -100
Wrong Answer
time: 14ms
memory: 10900kb
input:
3 3304 0 6902 1 28898 0
output:
0.00830132992062708
result:
wrong answer 1st numbers differ - expected: '0.0159243', found: '0.0083013', error = '0.0076230'