Skip to content

Instantly share code, notes, and snippets.

@IKKO-Ohta
Created July 1, 2017 15:23
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 IKKO-Ohta/72733fe627925ac0f2b20132eeca9164 to your computer and use it in GitHub Desktop.
Save IKKO-Ohta/72733fe627925ac0f2b20132eeca9164 to your computer and use it in GitHub Desktop.
import numpy as np
nums = [int(x) for x in input().split()]
sx,sy = nums[0],nums[1]
gx,gy = nums[2],nums[3]
V,T = nums[4],nums[5]
N = int(input())
for i in range(N):
her = [int(x) for x in input().split()]
alpha = np.asarray([her[0] - sx, her[1] - sy])
beta = np.asarray([gx - her[0], gy - her[1]])
if np.linalg.norm(alpha) + np.linalg.norm(beta) > V * T:
continue
else:
print("YES")
exit(0)
print("NO")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment