Skip to content

Instantly share code, notes, and snippets.

@kunishi
Created June 11, 2022 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunishi/03436db20c60d033cde242c8c8e31e98 to your computer and use it in GitHub Desktop.
Save kunishi/03436db20c60d033cde242c8c8e31e98 to your computer and use it in GitHub Desktop.
AtCoder ABC255 Problem B
N, K = map(int, input().split())
A = list(map(int, input().split()))
P = [[0, 0]]
for i in range(N):
P.append(list(map(int, input().split())))
distance = []
for i in range(1, N + 1):
d = []
for j in A:
d.append((P[i][0] - P[j][0]) ** 2 + (P[i][1] - P[j][1]) ** 2)
distance.append(min(d))
print(max(distance) ** 0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment