blob: 3eb14fdd425d23c1dba023ae8d14a90e567ea6b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
from queue import PriorityQueue
def get_speed(a,b):
return abs(a[1]-b[1])/abs(a[0]-b[0])
q = PriorityQueue()
N = int(input())
for i in range(N):
# T,X =
q.put(tuple(map(int, input().split())))
output = None
prev = q.get()
while not q.empty():
current = q.get()
speed = get_speed(current, prev)
prev = current
if output is None or speed > output:
output = speed
print(output)
|