Skip to content

Instantly share code, notes, and snippets.

@meooow25
Created February 19, 2019 22:48
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 meooow25/ff9b07200f9ef98841a9ad3e7b37828b to your computer and use it in GitHub Desktop.
Save meooow25/ff9b07200f9ef98841a9ad3e7b37828b to your computer and use it in GitHub Desktop.
# CLBATH
# Author: meooow
for n in range(int(input())):
v1, t1, v2, t2, v3, t3 = map(int, input().split())
ok = 0
if t1 <= t3 <= t2:
x, y = t2 - t3, t3 - t1
ok = x * v3 <= (x + y) * v1 and y * v3 <= (x + y) * v2
print('YES' if ok else 'NO')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment