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:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#solve
def solve():
    a, v = LI()
    b, w = LI()
    t = II()
    if (v - w) * t >= abs(a - b):
        print("YES")
    else:
        print("NO")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

if (V-W) == 0:
    print("NO")
else:
    if (V-W) > 0:
        if T >= (abs(B-A)/(V-W)):
            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())

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

Submission status: Accepted

Solution code:
import sys
import math
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
u=v-w
if u<=0:
  print("NO")
  sys.exit()

t2=abs(b-a)/u
if math.ceil(t2)<=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())

distance = abs(B - A)
hayasa = V - W

if hayasa > 0 and hayasa * T >= distance:
  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("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())
if a > b:
  a, b = a-v*t, b-w*t
  # a = -1 * 10**9 if a < -1 * 10**9 else a
  # b = -1 * 10**9 if b < -1 * 10**9 else b
  if a <= b:
    print('YES')
  else:
    print('NO')
else:
  a, b = a+v*t, b+w*t
  # a = 10**9 if a > 10**9 else a
  # b = 10**9 if b > 10**9 else b
  if a >= b:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
a,c=map(int,input().split())
b,d=map(int,input().split())
T=int(input())
if a<b:
  if a+(c*T)>=b+(d*T):
    print("YES")
  else:
    print("NO")
else:
  if a-(c*T)<=b-(d*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:
    r=a-t*v
    s=b-t*w
    if s<r:
        print('NO')
    else:
        print('YES')
else:
    r=a+t*v
    s=b+t*w
    if s>r:
        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>w:
    if a-v*t<=b-w*t and a+v*t>=b+w*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 (V-W)*T>=abs(A-B):
  print("YES")
else:
  print("NO")

Submission status: Accepted

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

distance = b - a
relative_velocity = w - v
if relative_velocity > 0:
    print('NO')
else:
    if (abs(relative_velocity)*t >= abs(distance)):
        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 b > a:
    if a < 0:
        if b < 0:
            ab = -a - -b
        else:
            ab = -a + b
    else:
        ab = b - a
else:
    if b < 0:
        if a < 0:
            ab = -b - -a
        else:
            ab = -b + a
    else:
        ab = a - b


vt = v * t
wt = w * t



if vt - wt >= ab:
    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())
A_low =A
A_high =A
B_low = B
B_high=B
A_low=A_low-(V*T)
A_high=A_high+(V*T)
B_low=B_low-(W*T)
B_high=B_high+(W*T)
if((B_low>=A_low) and (B_high<=A_high)):
    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())

sa=b-a
st=v-w

if sa<0:
  sa=-1*sa
if sa>st*t:
  print("NO")
else:
  print("YES")

Submission status: Accepted

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

A = int(A)
V = int(V)
B = int(B)
W = int(W)
T = int(T)

result = abs((B - A)) + (W * T) - V * T

if result <= 0:
    print('YES')
else:
    print('NO')

Submission status: Accepted

Solution code:

def method():
  a, v = input().split()
  b, w = input().split()
  t = int(input())

  a = int(a) # Oni cordinate
  v = int(v) # Oni Speed
  b = int(b) # Nige Cordinate
  w = int(w) # Nige Speed

  if a < b:
    distance = b - a
    relative_speed = v - w
    if relative_speed <= 0:
      return 'NO'
    else:
      if (distance / relative_speed) > t:
        return 'NO'
      else:
        return 'YES'
  else: # b < a
    distance = a - b
    relative_speed = v - w
    if relative_speed <= 0:
      return 'NO'
    else:
      if (distance / relative_speed) > t:
        return 'NO'
      else:
        return 'YES'

print(method())

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
def solve(A,V,B,W,T):
    diff = abs(A - B)
    time = (V - W) * T
    return "YES" if(diff <= time) else "NO"
def main():
    A,V = map(int,input().split())
    B,W = map(int,input().split())
    T = int(input())
    # solve()
    print(solve(A,V,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 b > a:
    at = a + v*t
    bt = b + w*t
    if at >= bt:
        print("YES")
    else:
        print("NO")

elif a > b:
    at = a - v*t
    bt = b - w*t
    if at <= bt:
        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())
c = a + t * v
d = b + t * w


if(a > b):
    c = a - t * v
    d = b - t * w
    if(c <= d):
        print("YES")
    else:
        print("NO")
elif(a == b):
    print("YES")
else:
    c = a + t * v
    d = b + t * w
    if(c >= 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())
C=abs(A-B)
if C>(V-W)*T:
    print("NO")
else:
    print("YES")

Submission status: Accepted

Solution code:
import sys

a,b=map(int,input().split())
c,d=map(int,input().split())
t=int(input())
if(d>b):
	print("NO")
else:

    p1=0
    p2=0
    if(a<=c):
        p1=a+t*b
        p2=c+t*d
        if(p1>=p2):
            print("YES")
        else:
            print("NO")
    else:
        p1=a-t*b
        p2=c-t*d
        if(p1<=p2):
            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())
res = False
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())
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,b= list(map(int,input().split()))

c,d = list(map(int,input().split()))
time = int(input())
if b <= d:
    print("NO")
else:
    dis = abs(a-c)
    ans = dis/(b-d)
    if ans <= time:
        print("YES")
    else:
        print("NO")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう
from operator import mul
from functools import reduce
from collections import Counter
#from collections import deque

#input = stdin.readline


j=0
k=0
n=3
r=1
a=[0]
#n=int(input())
#r=int(input())
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])#

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ
#intを取ると文字列分解に使える
'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"


#a,b=map(int, input().split())  #int style 複数数値入力　「A B」みたいなスペース空いた入力のとき

#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成


##############################################################################################
##############################################################################################
#under this line explains example calculation



'''
コンビネーションの組み合わせの中身を出力する形式
for i in itertools.combinations(brray, 2)
combinationsをpermutationsにすれば順列になる
今回なら(abc133B)
入力
1 2
5 5
-2 8
出力
[[1, 2], [5, 5], [-2, 8]]
もちろん一次元リストでも使えるし
何よりiもリストのように使えるので便利
'''

#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''

'''
import itertools
from itertools import combinations_with_replacement

combinationについて
以下の違いを意識しよう
combinations() p, r 長さrのタプル列、ソートされた順で重複なし

combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり


使用例 　　　　　　　　　　　                  出力　　
combinations('ABCD', 2)　　　　　　　　　　　　AB AC AD BC BD CD
combinations_with_replacement('ABCD', 2)　　 AA AB AC AD BB BC BD CC CD DD
'''



'''
#集計
#example
#a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1]
#a=Counter(a)
for i in a.most_common(n):print(i)
#most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。
#引数にint型の数字nを設定した場合は、出現回数が高い上位ｎ個の要素を返します。
#何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。
#out put
#(2, 8)
 #(1, 6)
#(3, 3)
#(4, 1)
'''


#二部探索(binary search)
#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)
#index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている
#A.insert(index, 5)
#print(index)
#print(A)
'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''

'''
素数の判定
'''
def is_prime(n):
    if n == 1: return False

    for k in range(2, int(np.sqrt(n)) + 1):
        #sqrt(n)+1以上は考えて約数はないので却下
        if n % k == 0:
            return False
            #割り切れたらFalse
    return True


'''
npのmaxとmaximumの違い
xs = np.array([1, -2, 3])
np.max(xs, 0)
この出力は3となります．[1, -2, 3]と0の4つの数字のうち，最も大きい値を出力します．

一方で，[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります．
その時は，numpyのmaximum関数を用います．

xs = np.array([1, -2, 3])
np.maximum(xs, 0)  # [1, 0, 3]

'''

def factorial(x, mod=10**9+7):
    # x!
    # 階乗
    # ex) factorial(5) = 120
    tmp = 1
    for i in range(1, x+1):
        tmp = (tmp * i) % mod
    return tmp
    '''
    Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large.
    But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does.
    '''
"#a,bの最大公約数"
def gcd(a, b):
    while b:#0以外なら進んでいくが、0になった時にとまる余りが0より、最大公約数と言える
        #print(a,b)#2,3
        #やり方てきにユークリッドの互除法か
        a, b = b, a % b#aには2 bには2%3が入る
    return a

"#a,bの最小公倍数"
def lcm(a, b):
    return a * b // gcd (a, b)

"#nの約数を全て求める"
def divisor(n):
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table


########################################################################
########################################################################
#b2=a[:]  #1次元のときはコピーはこれで良い
#print(b2)

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b3=copy.deepcopy(a)  #2次元配列はこうコピーする
#print(b3)

'''
ascii_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
digits = '0123456789'
hexdigits = '0123456789abcdefABCDEF'
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv...\xaf\xb0...
lowercase = 'abcdefghijklmnopqrstuvwxyz'
octdigits = '01234567'
printable = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU...
punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
whitespace = '\t\n\x0b\x0c\r '
'''
'''
引数endに任意の文字列を指定すると、その文字列が改行の代わりに最後に挿入される。例えば連続するprint()の出力を改行なしで単純に連結したい場合は空文字列''を指定すればよい。

print('abc', end='---')
print('xyz')
# abc---xyz

print('abc', end='')
print('xyz')
# abcxyz
source: print_basic.py
なお、デフォルトで改行されるのは引数endのデフォルト値が改行文字'\n'に設定されているから。
'''

def main():
    n=3
    steps=0
    state=0
    w=1
    j=0
    k=0
    #lenを変数に置くと事故るから注意
    #n=int(input())
    #a,b=input().split(" ")#a,bがともに文字列のとき
    a,v=map(int, input().split(" "))
    b,w=map(int, input().split(" "))
    t=int(input())
    dis=max(a,b)-min(a,b)
    disv=v-w
    #disv=abs(v-w)
    if disv<=0:#
        print("NO")
        sys.exit()
    #if dis%disv!=0:
    #    print("NO")
    #    sys.exit()
    if dis//disv<=t-1:
        print("YES")
        sys.exit()
    if dis%disv==0 and dis/disv<=t:
        print("YES")
        sys.exit()
    print("NO")
    sys.exit()
    #mapでとってもstrで変換すればappend可能
    #s=input()
    #a=[i for i in s]#int(i)にすれば数字も行ける
    #nl=list(map(int, input().split(" ")))#数字の時
    #print(a)
    #brray=[list(map(int, input().split(" ")))for i in range(n)]
    #print(brray)


    #for i in range(1,n+1,2):#これで1個飛ばしループになる
    # pass
     #print(i)

    l = ['aaa', 'bbb', 'ccc']
    x=l.index('aaa')#ある要素のインデックス番号を取得
    #s = ''.join(l)
    #s = " ".join(map(str,a))#スペースを空ける時はこう
    #print(s)
    # aaabbbccc

    #if state in known_states and not flag: # state => 2 steps => 5
        #こうやってある要素がリストの中にあるか探すのか
    #print(f'steps: {steps}, state: {state}')
    #こう書いてあるとデバックしやすい

    #dp= [[0]*3 for i in range(5)]#列　行
    #dp用の0の入ったやつ
    #dp= [[0]*(w+1) for i in range(n+1)]#0からwまでのw+1回計算するから
    #print(dp)＃初期条件が入る分計算回数+1列分必要(この場合は判断すべきものの数)
    DP = np.zeros(w+1, dtype=int)#これでも一次元リストが作れる
    exdp=np.zeros((3,4)) # ３×４の２次元配列を生成。2次元ならこう
    #dtypeは指定しないとfloatになる
    #for i in range(n):#ちょっとした入力に便利
    #    a, b = map(int, input().split())
        #dp[i][0] += [a]
        #これだとintとlistをつなぐことになって不適
    #    dp[i] += [a]
    #    dp[i] += [b]
        #これはうまくいく
        #やり方はいろいろあるということ
    #print(dp)


    #brray=[list(map(int, input().split(" ")))for i in range(N)
    #print(brray)



    '''
    入力
    1234
    出力
    [1, 2, 3, 4]
    '''
    pin_l=["x" for i in range(10)]#内包表記に慣れろ
    #print(pin_l)

    ls = ["a", "b", "c", "d", "e"]


    #print(ls[2:5])
    #スライスでの取得

    #print(ls[:-3])
    #一番左端から右から3番目より左まで取得

    #print(ls[:4:2])
    #スライスで1個飛ばしで取得
    #ないときは左端スタート
    #始点のインデックス番号 : 終点のインデックス番号 : スキップする数+1
    #print(ls[::2])
    '''
    lsというリストの場合に、1つ飛びの値を取得したい場合には
    ls[::2]
    のようにします。こうすると、
    ["a", "c", "d"]と出力される
    '''

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:
  T = -T

posA = A + V*T
posB = B + W*T


if T <= 0:
  if posA <= posB:
    print('YES')
  else:
    print('NO')
else:
  if posA >= posB:
    print('YES')
  else:
    print('NO')

Submission status: Accepted

Solution code:
def LI():
    return list(map(int, input().split()))

a, v = LI()
b, w = LI()
t = int(input())

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

Submission status: Accepted

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

kyori = max(A-B, B-A)

if W>V:
  print("NO")
else:
  if (V-W)*T>=kyori:
    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())

x=b-a
if x<0:
    x= -x
y=v-w

if y*t>=x:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
# 2020/06/13
# 東京海上日動　プログラミングコンテスト2020 - B

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

dist = max(a, b) - min(a, b)
chase = v * t - w * t   # tで縮む距離

# Calc
if w >= v:
    ans = 'NO'
else:
    if dist <= chase:
        ans = 'YES'
    else:
        ans = 'NO'

# Output
print(ans)

Submission status: Accepted

Solution code:
a_v = input()
b_w = input()
t = input()
t_int = float(t)
a_v_list = a_v.split()
a = a_v_list[0]
a_int = float(a)
v = a_v_list[1]
v_int = float(v)
b_w_list = b_w.split()
b = b_w_list[0]
b_int = float(b)
w = b_w_list[1]
w_int = float(w)
d = abs(a_int-b_int)
if v_int > w_int:
  spd = v_int - w_int
  chacet = d / spd
  if chacet > t_int:
    print("NO")
  else:
    print("YES")
else:
  print("NO")

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, v) = [int(e) for e in lines[0].split(' ')]
    (b, w) = [int(e) for e in lines[1].split(' ')]
    (t, ) = [int(e) for e in lines[2].split(' ')]

    return (a, v, b, w, t)


def solve(a, v, b, w, t):
    

    x = v - w
    if a < b and x > 0 and t * x >= b - a:
        result = 'YES'
    elif b < a and x > 0 and t * x >= a - b:
        result = 'YES'
    else:
        result = 'NO'

    return result    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

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 v*t - w*t >= abs(a-b):
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
A, V = list(map(int, input().split()))  # 入力のときに N を使う必要はありません
B, W = list(map(int, input().split()))  # 入力のときに N を使う必要はありません
T = int(input())  # 入力のときに N を使う必要はありません

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

Submission status: Accepted

Solution code:
input1 = list(map(int, input().split()))
input2 = list(map(int, input().split()))
T = int(input())
A = input1[0]
V = input1[1]
B = input2[0]
W = input2[1]

# print(A, V, B, W, T)



if W >= V:
    catch = False
else:
    if abs(B-A)/(V-W) <= T:
        catch = True
    else:
        catch = False

print("YES" if catch == True 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:
#!/usr/bin/env python3
# vim: set fileencoding=utf-8

# pylint: disable=unused-import, invalid-name, missing-docstring, bad-continuation


"""Module docstring
"""

import functools
import heapq
import itertools
import logging
import math
import os
import random
import string
import sys
from argparse import ArgumentParser
from collections import defaultdict, deque
from copy import deepcopy
from io import BytesIO, IOBase
from typing import Dict, List, Optional, Set, Tuple


def solve(a: int, v: int, b: int, w: int, t: int) -> bool:
    if w >= v and a != b:
        return False
    if a > b:
        return a - v * t <= b - w * t
    return a + v * t >= b + w * t


def do_job(stdin, stdout):
    "Do the work"
    LOG.debug("Start working")
    # first line is number of test cases
    A, V = map(int, stdin.readline().split())
    B, W = map(int, stdin.readline().split())
    T = int(stdin.readline().strip())
    # values = []
    # for _ in range(N):
    #     values.append(stdin.readline().split())
    result = solve(A, V, B, W, T)
    print("YES" if result else "NO", file=stdout)


def print_output(testcase: int, result, stdout) -> None:
    "Formats and print result"
    if result is None:
        result = "IMPOSSIBLE"
    print("Case #{}: {}".format(testcase + 1, result), file=stdout)
    # 6 digits float precision {:.6f} (6 is the default value)
    # print("Case #{}: {:f}".format(testcase + 1, result), file=stdout)


BUFSIZE = 8192


class FastIO(IOBase):
    # pylint: disable=super-init-not-called, expression-not-assigned
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    # pylint: disable=super-init-not-called
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def configure_log() -> None:
    "Configure the log output"
    log_formatter = logging.Formatter("L%(lineno)d - " "%(message)s")
    handler = logging.StreamHandler(IOWrapper(sys.stderr))
    handler.setFormatter(log_formatter)
    LOG.addHandler(handler)


LOG = None
# for interactive call: do not add multiple times the handler
if not LOG:
    LOG = logging.getLogger("template")
    configure_log()


def main(argv=None):
    "Program wrapper."
    if argv is None:
        argv = sys.argv[1:]
    parser = ArgumentParser()
    parser.add_argument(
        "-v",
        "--verbose",
        dest="verbose",
        action="store_true",
        default=False,
        help="run as verbose mode",
    )
    args = parser.parse_args(argv)
    if args.verbose:
        LOG.setLevel(logging.DEBUG)
    stdin = IOWrapper(sys.stdin)
    stdout = IOWrapper(sys.stdout)
    do_job(stdin, stdout)
    stdout.flush()
    for h in LOG.handlers:
        h.flush()
    return 0


if __name__ == "__main__":
    sys.exit(main())

Submission status: Accepted

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

dis = abs(a-b)
dif = v-w
temp = dif*T
if temp >= dis:
    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)*T>=B-A:
    print("YES")
elif A>B and (V-W)*T>=A-B:
    print("YES")
else:
    print("NO")

Submission status: Accepted

Solution code:
def funct(a, b, v, w, t):
    x = abs(a - b)
    s = v - w
    if(s <= 0): return False
    else:
        if(x // (v - w) < t or (x % (v - w) == 0 and x // (v - w) <= t)):
            return True
        else:   return False    
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if(funct(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 B > A and A+V*T >= B+W*T:
  print('YES')
elif B < A and A-V*T <= B-W*T:
  print('YES')
else:
  print('NO')

Submission status: Accepted

Solution code:
s = input().split()
A = int(s[0]) # 鬼の最初の位置
V = int(s[1]) # 鬼の速さ
s = input().split()
B = int(s[0]) # 逃げる子供の最初の位置
W = int(s[1]) # 逃げる子供の速さ
T = int(input())

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

if AB == 0:
    print("YES")
elif speed_dif <= 0:
    print("NO")
else:
    time = AB / speed_dif
    if time <= 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 abs(b - a) + t * (abs(w) - abs(v)) > 0:
    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())

#print((v-w) // (b-a), v-w, b-a)
#if (abs(v-w)*t) % abs(b-a) == 0:
if 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 B > A:
    if T*(V-W) >= B - A:
        print("YES")
    else:
        print("NO")

if A > B:
    if T*(V-W) >= A - B:
        print("YES")
    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())

flag = False
if a < b:
    l1 = a + v * t
    l2 = b + w * t
    if l1 >= l2:
        flag = True
else:
    l1 = a + (v * -1) * t
    l2 = b + (w * -1) * t
    if l1 <= l2:
        flag = True
print("YES" if flag else "NO")

Submission status: Accepted

Solution code:
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy

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

print("YES" if abs(A-B)+W*T <= V*T 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):
    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 (b - a) <= (v-w)*t:
#     print("YES")
# else:
#     print("NO")

# if b+1000000000+w*t > a+1000000000+v*t:
#     print("NO")
# else:
#     print("YES")


if a <b:
    dis = b - a
else:
    dis = a - b

dif = v-w

if w > v:
    print("NO")
elif dis <= dif*t:
    print("YES")
else:
    print("NO")