Problem:


Score : 200 points

Problem Statement

Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second.
The other child is now at coordinate B, and she can travel the distance of W per second.

He can catch her when his coordinate is the same as hers.
Determine whether he can catch her within T seconds (including exactly T seconds later).
We assume that both children move optimally.

Constraints

-10^9 \leq A,B \leq 10^9

1 \leq V,W \leq 10^9

1 \leq  T \leq 10^9

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A V
B W
T

Output

If "it" can catch the other child, print YES; otherwise, print NO.

Sample Input 1

1 2
3 1
3

Sample Output 1

YES

Sample Input 2

1 2
3 2
3

Sample Output 2

NO

Sample Input 3

1 2
3 3
3

Sample Output 3

NO



Sample input:
1 2
3 1
3


Sample output:
YES

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v <= w and a != b:
  print('NO')
elif abs(b-a) / (v-w) <= t:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
diff_dist = B - A
diff_v = V - W
flag = False
if diff_v == 0:
    if diff_dist == 0:
        flag = True
elif diff_dist == 0:
    flag = True
else:
    if diff_v > 0:
        t = abs(diff_dist) / diff_v
        if t <= T:
            flag = True
if flag:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
(A, V) = map(lambda a: float(a), input().split())
(B, W) = map(lambda a: float(a), input().split())
T = float(input())

D = abs(A - B)
X = V - W

if (X*T >= D):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
# 座標A、速度V
a, v = map(int, input().split())

# 座標B、速度W
b, w = map(int, input().split())

# 時間T
t = int(input())

# 座標の差と速度の差
sa_x = abs(b-a)
sa_v = v-w

# 速度の差×時間が座標の差以上ならOK
if (sa_v * t >= sa_x):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
print('YES' if (v-w)*t>=abs(a-b) else 'NO')

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t >= abs(a-b):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())


if V<=W:
    print('NO')
else:
    if abs(A-B)/(V-W)<=T:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split(" "))
B, W = map(int, input().split(" "))
T = int(input())

judge = (V-W)*T >= abs(A-B)
if(judge):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:

a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a>b:
    x=a-v*t
    y=b-w*t
    if x<=y:
        print('YES')
    else:
        print('NO')
else:
    x=a+v*t
    y=b+w*t
    if x>=y:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(a - b) <= (v - w) * t:
    ans = 'YES'
else:
    ans = 'NO'
print(ans)

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if a > b:
    oni = a + (-1*v) * t
    nige = b + (-1*w) * t
    if oni <= nige:
        print("YES")
    else:
        print("NO")
else:
    oni = a + v*t
    nige = b + w * t
    if oni >= nige:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:

def resolve():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    diff_d = abs(A - B)
    dif_move = (V - W) * T

    if diff_d <= dif_move:
        print("YES")
    else:
        print("NO")

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
a, v = [int(x) for x in input().split()]
b, w = [int(x) for x in input().split()]
t = int(input())
if w > v:
    print("NO")
elif w == v:
    if a == b:
        print("YES")
    else:
        print("NO")
else:
    if abs(a - b)/(v - w) <= t:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
f = (v-w)*t
c = a-b
if(c<0):
  c *= (-1)
if(c>f):
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
#import math
#import numpy as np
#import torch
#import torch.nn as nn
#import matplotlib.pyplot as plt
#from decimal import Decimal

#N=int(input())
A,V = map(int,input().split())
B,W = map(int,input().split())
T=int(input())
#A = list(map(int,input().split()))
#S=str(input())

if V<=W:
    print('NO')
else:
    L=abs(A-B)
    if L/(V-W)<=T:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())

if (V-W)*T >=abs(B-A):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce, lru_cache  # @lru_cache(None)
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**6)
# ----------------------------------------------------------- #

a, v = (int(x) for x in input().split())
b, w = (int(x) for x in input().split())
t = int(input())

if a == b:
    print("YES")
elif a < b:
    if a + t*v >= b + t*w:
        print("YES")
    else:
        print("NO")
else:
    if a - t*v <= b - t*w:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

AB = abs(A - B)
VW = V - W

if VW == 0:
  print("NO")
  
elif AB <= VW * T:
  print("YES")

else:
  print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
d=abs(a-b)
q=v-w
if q<=0:
    print("NO")
else:
    x=q*t
    if x>=d:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if w < v:
    rel_vel = v - w
    dis = abs(a - b)
    time = dis / rel_vel
    if time <= t:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w  = map(int,input().split())
t = int(input())

if (abs(a-b) - (v-w)*t <= 0):
    print("YES")
    
else:print("NO")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
a, b = min(a, b), max(a, b)
print(["NO", "YES"][a + t * v >= b + t * w])

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if abs(a-b) <= t*(v-w):
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

d=abs(a-b)


if(v*t>=w*t+d): print("YES")
else:print("NO");

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(b-a) - (v-w)*t <= 0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def main():
    a,v = map(int,input().split())
    b,w = map(int,input().split())
    t = int(input())
    d = abs(b-a)
    u = v-w
    if u<=0:
        print('NO')
    else:
        if d/u>t:
            print('NO')
        else:
            print('YES')
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
print(['YES','NO'][abs(B-A)/(V-W)>T] if V-W>0 else 'NO')

Submission status: Accepted

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    print("YES" if abs(b - a) <= t * (v - w) else "NO")
resolve()

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580


def solve():

    A,V = map(int, input().split())
    B,W = map(int, input().split())
    T = int(input().rstrip())
    if(B < A):
        V *= -1
        W *= -1
    if (A-B)*(A + T*V - B -T*W) <= 0:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print("YES" if (v - w) * t >= abs(b - a) else "NO")

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    A, V = [int(x) for x in input().strip().split()]
    B, W = [int(x) for x in input().strip().split()]
    T = int(input())
    if A == B:
        print('YES')
        return
    if W > V:
        print('NO')
        return
    if (V - W) * T >= abs(A - B):
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
a,v = map(int, sys.stdin.readline().rstrip("\n").split())
b,w = map(int, sys.stdin.readline().rstrip("\n").split())
t = int(sys.stdin.readline().rstrip("\n"))
between = abs(b - a)
speed = v-w
if between <= speed*t:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v <= w:
    print('NO')
else:
    if abs(a - b) / (v - w) <= t:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

#距離
l = abs(a-b) 

#差分
diff = t*(v-w)

if l > diff:
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if v*t-abs(b-a)>=w*t:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if A < B and B+W*T <= A+V*T:
    print("YES")
elif A > B and B-W*T >= A-V*T:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
D = abs(A - B)
if (V > W) and \
   (D / (V - W) <= T):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
import sys
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if v==w or w>v:
    print('NO')
    sys.exit()
else:
    tp=(b-a)/(v-w)
    tm=(a-b)/(v-w)
    if b>a:
        if t>=tp:
            print('YES')
        else:
            print('NO')
    else:
        if t>=tm:
            print('YES')
        else:
            print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if V * T - abs(B-A) >= W * T:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
T = int(input())

if w - v >= 0:
    print("NO")
    exit()

t = abs(a-b)/abs(v-w)
if t <= T:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#!usr/bin/env pypy3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)

def main():
    A, V = LI()
    B, W = LI()
    T = I()
    
    if V - W > 0:
        print("YES" if (V - W) * T >= abs(A - B) else "NO")
    else:
        print("NO")

main()

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if(A<B):
  A1=A+V*T
  B1=B+W*T

  if(A1>=B1):
    print('YES')
  else:
    print('NO')
    
else:
  A1=A-V*T
  B1=B-W*T

  if(A1<=B1):
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())

if A<B:
    a=V*T
    b=W*T
    a=A+a
    b=B+b
    if b<=a:
        print("YES")
    else:
        print("NO")
elif B<A:
    a=V*T
    b=W*T
    a=A-a
    b=B-b
    if a<=b:
        print("YES")
    else:
        print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if B > A:
    A = A + V*T
    B = B + W*T
    if A >= B:
        print('YES')
    else:
        print('NO')
else:
    A = A - V*T
    B = B - W*T
    if A <= B:
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())

distance = abs(a-b)

if distance <= (v-w)*t:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a,v,b,w,t=map(int,open(0).read().split())
print('YNEOS'[abs(b-a)>(v-w)*t::2])

Submission status: Accepted

Solution code:
a,v,b,w,t=map(int,open(0).read().split())
print(['NO','YES'][abs(b-a)<=(v-w)*t])

Submission status: Accepted

Solution code:
A, V = map(int,input().split())
B, W = map(int,input().split())
T = int(input())
if (V <= W):
    print("NO")
elif(T < abs(A - B)/(V-W)):
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# B

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v <= w:
    print('NO')
else:
    if (v-w) * t >= abs(a - b):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
 
if a < b:
    if v <= w:
        print('NO')
    else:
        if b - a <= t * (v - w):
            print('YES')
        else:
            print('NO')
elif a > b:
    if v <= w:
        print('NO')
    else:
        if a - b <= t * (v - w):
            print('YES')
        else:
            print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
d = abs(b-a)
d2 = v-w
print('YES' if d <= d2*t else 'NO')

Submission status: Accepted

Solution code:
stdin = [input() for i in range(3)]
line = stdin[0].split(' ')
A = int(line[0])
V = int(line[1])
line = stdin[1].split(' ')
B = int(line[0])
W = int(line[1])
T = int(stdin[2])
length = 0
if B > A:
    length = B-A
else:
    length = A-B
if (V-W)*T < length:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if a < b:
    if v <= w:
        print('NO')
    else:
        if b - a <= t * (v - w):
            print('YES')
        else:
            print('NO')
elif a > b:
    if v <= w:
        print('NO')
    else:
        if a - b <= t * (v - w):
            print('YES')
        else:
            print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

d = abs(A-B)
n = V-W

if n <= 0:
  print("NO")
  exit()
print("YES" if n * T >= d else "NO")

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

if W>=V:
  print("NO")
elif abs(B-A)/(V-W) <= T:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a<b:
  if w<v:
    if (v-w)*t>=(b-a):
      print("YES")
    else:
      print("NO")
  else:
    print("NO")
else:
  if w<v:
    if (v-w)*t>=(a-b):
      print("YES")
    else:
      print("NO")
  else:
    print("NO")

Submission status: Accepted

Solution code:
a, v = [int(i)  for i in input().split()]
b, w = [int(i)  for i in input().split()]
t = int(input())

if w >= v:
  print("NO")
  exit()
#print((b-a) / (v-w))

if b > a:
  if a + v*t >= b + w*t:
    print("YES")
  else:
    print("NO")
else :
  if a - v*t <= b - w*t:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

Solution code:
# coding: utf-8

############################

a,v =map(int,input().split())
b,w = map(int,input().split())
t = int(input())

if abs(a-b) <= (v-w)*t:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if a-v*t <= b-w*t and b+w*t <= a+v*t:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T    = int(input())

set_position = abs(B-A)
move         = V-W

if move*T >= set_position:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

dist = abs(B-A)
r_vel = V - W

if r_vel * T >=dist:
  print("YES")
 
else:
  print("NO")

Submission status: Accepted

Solution code:
A, V = map(int,input().split())
B, W = map(int,input().split())
T    = int(input())

if (V-W)*T >= abs(A-B):
  print("YES")
else:
  print("NO")
#

Submission status: Accepted

Solution code:
oni_A, oni_V = map(int, input().split())
nige_B, nige_W = map(int, input().split())
T = int(input())

d = abs(oni_A - nige_B)

if (nige_W >= oni_V):
    print('NO')
else:
    time = d / (abs(oni_V - nige_W))
    if (time <= T):
        print('YES')
    else:
        print('NO')

Submission status: Accepted

Solution code:
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v < w:
    print('NO')
    exit()
if abs(a-b) <= t*(v-w):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
print("YES" if (V-W)*T >= abs(B-A) else "NO")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if a < b:
  if a + v * t >= b + w * t:
    print("YES")
  else:
    print("NO")
else:
  if a - v * t <= b - w * t:
    print("YES")
  else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

S = V - W
print('NO' if S <= 0 or abs(A - B) > T * S else 'YES')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if abs(A - B) <= (V - W) * T:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
import sys

a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

d1 = (v - w)*t
d2 = abs(a-b) 
if v < w:
    print("NO")
elif d1 >= d2 :
    print("YES")
else:
    print('NO')

Submission status: Accepted

Solution code:
a,v = map(int,input().split())

b,w = map(int,input().split())

t = int(input())

sa = abs(a-b)

tume = v-w

if tume*t < sa:
    print('NO')
else:
    print('YES')

Submission status: Accepted

Solution code:
A, V = list(map(int, input().split()))
B, W = list(map(int, input().split()))
T = int(input())

abs_BA = abs(B-A)
sub_VW = V - W

if sub_VW <= 0:
  print("NO")
elif abs_BA <= T * sub_VW:
  print("YES")
else:
  print("NO")

Submission status: Accepted

Solution code:
def solve(d,p,t):
  if d - p * t <= 0:
    return "YES"
  else:
    return "NO"

A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

d = abs(B-A)
p = V - W
print(solve(d,p,T))

Submission status: Accepted

Solution code:
buf = list(map(int,input().split(" ")))
A,V = buf[0],buf[1]

buf = list(map(int,input().split(" ")))
B,W = buf[0],buf[1]

T = int(input())

if V <= W:
    print("NO")
    exit(0)
if (abs(A - B) / (V - W)) <= T:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if(W > V):
    print('NO')
    exit(0)
# 相対速度、距離
S = V - W
D = abs(A - B)
if(D > S * T):
    print('NO')
    exit(0)
else:
    print('YES')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())


# 相対速度、距離
S = V - W
D = abs(A - B)
if(D > S * T):
    print('NO')
    exit(0)
else:
    print('YES')

Submission status: Accepted

Solution code:
# B - Tag
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v > w:
	if abs(b - a) / (v - w) <= t:
		print('YES')
		exit()

print('NO')

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
x=(v-w)*t
if x>=abs(a-b):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())


ans = 'YES' if abs(B - A) <= (V - W) * T else 'NO'
print(ans)

Submission status: Accepted

Solution code:
x = input().split()
a, v = int(x[0]), int(x[1])
x = input().split()
b, w = int(x[0]), int(x[1])
t = int(input())
if abs(b-a)+w*t <= v*t:
	print("YES")
else:
	print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
z=(v*t)
y=(w*t)
if z-y>=abs(b-a):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if abs(A-B) <= T*(V-W):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys
a = list(map(int,input().split()))
b = list(map(int,input().split()))
t = int(input())
if a[1] <= b[1]:
    print('NO')
    sys.exit()
elif abs(a[0]-b[0])/abs(a[1]-b[1]) <= t:
    print('YES')
    sys.exit()
else:
    print('NO')

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(a-b) <= t*(v-w):
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
s=int(input())
if(abs(a-b)>(v-w)*s):
  print("NO")
else:
  print("YES")

Submission status: Accepted

Solution code:
a,v=map(int,raw_input().split())
b,w=map(int,raw_input().split())
t=input()

if v<=w:
	print "NO"
elif t*(v-w)>=abs(a-b):
	print "YES"
else:
	print "NO"

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
ans = 'NO'
d = abs(a-b)
m = (v-w)*t

if d-m <= 0:
    ans = 'YES'

print(ans)

Submission status: Accepted

Solution code:
A,V=map(int, input().split())
B,W=map(int, input().split())
T=int(input())

if W>=V:
    print("NO")
    quit()

SA=abs(A-B)

IDOU=V-W

IDOUTARN=IDOU*T

ANS=SA-IDOUTARN

if ANS<=0:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""東京海上日動　プログラミングコンテスト2020: A - Tag
https://atcoder.jp/contests/tokiomarine2020/tasks/tokiomarine2020_b
"""


def run(a, vt, b, wt):
    if a < b:
        if b + wt <= a + vt:
            return 'YES'
        else:
            return 'NO'
    else:
        if a - vt <= b - wt:
            return 'YES'
        else:
            return 'NO'


def main():
    A, V = list(map(int, input().split()))
    B, W = list(map(int, input().split()))
    T = int(input())

    print(run(A, V*T, B, W*T))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a<b and v<=w:
    print("NO")
elif(w>v and (a>b or b>a or a==b)):
    print("NO")
else:
    if abs(b-a)<=t*abs(v-w):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a<b and v<=w:
    print("NO")
elif w>v:
    print("NO")
else:
    if abs(b-a)<=t*abs(v-w):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a<b and v<=w:
    print("NO")
else:
    if abs(b-a)<=t*(v-w):
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if (V-W)*T>=abs(A-B):
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
A, V = tuple(int(c) for c in input().split(' '))
B, W = tuple(int(c) for c in input().split(' '))
T = int(input())

delta = V - W

if A == B:
  print('YES')
  exit()
elif delta <= 0:
  print('NO')
  exit()
else:
  d = abs(A-B)
  time = d / delta
  if time <= T:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
def main():
    A,V = [int(x) for x in input().split()]
    B,W = [int(x) for x in input().split()]
    T = int(input())
    D = abs(A-B)
    if V<=W:
        print('NO')
        return
    F = V-W
    if D/F <= T:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def LI(): return list(map(int, input().split()))
def I(): return map(int, input().split())
mod = 10**9 + 7

def main():
  a, v = I()
  b, w = I()
  t = int(input())
  if v <= w:
    print('NO')
  else:
    if abs(a-b) <= (v-w)*t :
      print('YES')
    else:
      print('NO')

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
a,v,b,w,t=map(int,open(0).read().split())
print('YNEOS'[v-w<abs(a-b)/t::2])

Submission status: Accepted

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
firstDis = abs(A - B)
steps = (V - W)*T
print("YES" if firstDis <= steps else "NO")

Submission status: Accepted

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print('YES' if abs(a - b) <= (v - w) * t else 'NO')

Submission status: Accepted

Solution code:
#import math

a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

ans=a+t*v>=b+t*w and a-t*v<=b-t*w
print('YES' if ans else 'NO')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


A, V = MI()
B, W = MI()
T = I()


d = max(0, V - W)
if abs(A - B) - d * T <= 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, V = il()
    B, W = il()
    T = ii()

    dist = abs(B - A)
    run = T * (V - W)
    print('YES' if run >= dist else 'NO')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, V = map(int, input().split(" "))
B, W = map(int, input().split(" "))
T = int(input())

if W > V:
  print("NO")
else:

  if abs(A - B) <= T * (V - W):
    print("YES")
  else:
    print("NO")

# if A - B > 0:
#   # 負の方向に逃げる
#   if (B + 10**9) / W <= T:
#     # print("left reach")
#     # T立つよりも先に端に到達してしまう場合
#     Bdist = (B + 10**9)
#   else:
#     # print("run left")
#     Bdist = W * T
# else:
#   # 正の方向に逃げる
#   if (10**9 - B) / W <= T:
#     # print("right reach")
#     Bdist = (10**9 - B)
#   else:
#     # print("run right")
#     Bdist = W * T

# Adist = V * T
# if Bdist + abs(A - B) <= Adist:
#   print("YES")
# else:
#   print("NO")

Submission status: Accepted

Solution code:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input()) 

if a < b:
    if a + (v * t) >= b + (w * t):
        print('YES') 
    else:
        print('NO')
elif a > b:
    if a - (v * t) <= b - (w * t):
        print('YES') 
    else:
        print('NO')

Submission status: Accepted

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
dist = abs(a-b)
speed = v-w
if speed<=0:
    print('NO')
    exit()
if dist<=speed*t:
    print('YES')
else:
    print('NO')