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

Solution (Python):


import sys
sys.setrecursionlimit(300000)

YES = "YES"  
NO = "NO"  

def solve(A: int, V: int, B: int, W: int, T: int):
    d = abs(A - B)
    if V > W and d / (V - W) <= T:
        ret = YES
    else:
        ret = NO
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    V = int(next(tokens))  
    B = int(next(tokens))  
    W = int(next(tokens))  
    T = int(next(tokens))  
    solve(A, V, B, W, T)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
input = sys.stdin.readline
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
d = abs(A - B)
if (W - V) * T + d <= 0: print("YES")
else: print("NO")

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    diff = abs(A - B)
    mov = V - W
    if mov <= 0:
        print("NO")
    elif mov * T < diff:
        print("NO")
    else:
        print("YES")


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    if V <= W: print("NO")
    else:
        diff = abs(A - B)
        if (V - W) * T >= diff: print("YES")
        else: print("NO")

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
import sys

readline = sys.stdin.buffer.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, v = map(int, readline().split())
    b, w = map(int, readline().split())
    t = int(input())

    dist = abs(b - a)
    vel = v - w

    if vel * t >= dist:
        print("YES")
    else:
        print("NO")


if __name__ == '__main__':
    main()

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

Solution (Python):

A,V = map(int,input().split())

B,W = map(int,input().split())

T = int(input())

dif = abs(A-B)

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

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    a, va = map(int, input().split())
    b, vb = map(int, input().split())
    T = int(input())
    if vb >= va:
        print("NO")
    else:
        if (va - vb) * T >= abs(a - b):
            print("YES")
        else:
            print("NO")


if __name__ == '__main__':
    main()

Solution (Python):
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")

Solution (Python):
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')

Solution (Python):
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")

Solution (Python):
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")

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

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

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

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

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

Solution (Python):
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
def gcd(a,b):
  while b:a,b=b,a%b
  return a
aa=a-t*v
ab=a+t*v
ba=b-t*w
bb=b+t*w
if aa<=ba<=bb<=ab:print("YES")
else:print("NO")

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    A, V = ZZ()
    B, W = ZZ()
    T = Z()
    print('YES' if abs(A-B) <= T * (V - W) else 'NO')

    return

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    A,V=MI()
    B,W=MI()
    T=I()
    if abs(A-B)<=T*(V-W):
        print("YES")
    else:
        print("NO")

main()

Solution (Python):
import sys
input=lambda: sys.stdin.readline().rstrip()
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if t*(v-w)>=abs(a-b):
  print("YES")
else:
  print("NO")

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

Solution (Python):
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")

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

d = abs(a - b)

aa = v * t
bb = d + w * t
if aa < bb:
    print('NO')
else:
    print('YES')

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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')

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')
AtoZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




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

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