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: Wrong Answer

Solution code:
import numpy as np
import sys
#import copy


def xnxn(n=0, flag="v"):
    """
    args:
        int n: a number of lows to read
    example:
        input   1
        retrun  1

        input   1 2 3
        return  [1,2,3]
        input   1 2 3
                4 
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        temp = list(map(int, input().split()))
        if len(temp) == 1:
            if flag == "l":
                return temp
            else:
                return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        temp = [list(map(int, input().split())) for _ in range(n)]
        return temp


def sp_xnxn(n=0):
    """
    args:
        int n: a number of lows to read
    example
        input   1
        retrun  [1]

        input   123
        return  [1,2,3]

        input   123
                4 
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        return [int(k) for k in xsxs()]
    else:
        return [[int(k) for k in xsxs()] for _ in range(n)]


def xsxs(n=0):
    """
    args:
        int n: a number of lows to read 
    example:
        input   AA
        retrun  AA

        input   A BBB CC
        return  ["A","BBB","CC"]

        input   A BB CCC
                D
        return  [["A","BBB","CC"],
                ["D"]]
    """
    if n == 0:
        temp = list(input().split())
        if len(temp) == 1:
            return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        return [list(input().split()) for _ in range(n)]


def sp_xsxs(n=0):
    """
    args:
        int n: a number of lows to read 
        example:
            input   A
            retrun  ["A"]

            input   ABC
            return  ["A","B","C"]

            input   ABC
                    D
            return  [["A","B","C"],
                    ["D"]]
    """
    if n == 0:
        return [s for s in xsxs()]
    else:
        return [[s for s in xsxs()] for _ in range(n)]


a, v = xnxn()
b, w = xnxn()
t = xnxn()

if v - w <= 0:
    print("No")
elif abs(b - a) / (v - w) <= t:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

a_dis = t*v
b_dis = t*w

if a_dis > b_dis:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
for i in range(1,T+1):
  if V*i+A >= W*i+B:
    print('YES')
    exit()
  if V*T+A < V*T+B:
    break

print('NO')

Submission status: Wrong Answer

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

if v-w > 0 and abs(a-b)/(v-w) <= t:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

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

if W >= V:
    print("NO")
else:
    velocity = V - W
    distination = abs(A - B)
    time = math.ceil(velocity / distination)
    if T >= time:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
  print('No')
  exit(0)
if abs(a-b)%(v-w) == 0:
  f = abs(a-b//(v-w))
else:
  f = abs(a-b//(v-w)+1)
if f <= t:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
A, V = (int(i) for i in input().split())
B, W = (int(i) for i in 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: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
res = False
for t in range(T):
    A += V
    B += W
    if A == B:
        res = True
if res:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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: Wrong Answer

Solution code:

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

if (W-V) == 0:
    print("NO")
elif (A-B) % (W-V) != 0:
    print("NO")
else:
    ans = (A-B)//(W-V)
    #print(ans)
    if 1 <= ans <= T:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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 a>b and v>=w:
    print("NO")
elif a<b:
    if (b-a)%(v-w)==0 and (b-a)//(v-w)<=t:
        print("YES")
    else:
        print("NO")
else:
    if (a-b)%(w-v)==0 and (a-b)//(w-v)<=t:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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: Wrong Answer

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

for i in range(t+1):
    if a == b:
        ans = "YES"
        break
    a += v
    b += w
print(ans)

Submission status: Wrong Answer

Solution code:

from decimal import *
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

def solve(A, B, V, W, T):
    if A>B or V<=W:
        return False
    t = Decimal(B-A)/Decimal(V-W)
    return t<=T





A, V = rrm()
B, W = rrm()
T = rri()
ans = solve(A, B, V, W, T)
if ans:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys
input = sys.stdin.readline
ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]

a,v = ip()
b,w = ip()
t = inp()
if (a + v*t) >= (b + w*t):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if W>=V:
  print('No')
else:
  key=abs(A-B)
  if key+W*T>V*T:
    print('No')
  else:
    print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t=int(input())
for i in range(t):
    if (a >= b):
        break
    a+=v
    b+=w
if (a>=b):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

A_T=A+V*T
B_T=B+W*T

if A_T>=B_T:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a == b:
  print("YES")
else:
  ca = a
  cb = b
  catch = False
  for _ in range(t):
    ca += v
    cb += w
    if ca == cb:
      catch = True
      break
  if catch:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans="NO"
for i in range(t+1):
  if a+v*i == b+w*i:
    ans="YES"
    break
print(ans)

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

def input_one_number():
    return int(input())

def input_multiple_number():
    return map(int, input().split())

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


A , V = input_multiple_number()
B, W = input_multiple_number()
T = input_one_number()

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

if D - v*T > 0 :
	print("NO")
else:
	print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if W >= V:
    print('No')
else:
    if (V-W)*T >= max(A,B) - min(A,B):
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Ax = A + V*T
Bx = B + W*T
if A > B:
    if Ax >= Bx:
        print('No')
else:
    if Ax >= Bx:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

sub = abs(b - a)
if sub == 0:
    print("YES")
else:
    ss = v - w
    if ss < 1:
        print("NO")
    else:
        if sub % ss == 0:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        else:
            print("NO")

Submission status: Wrong Answer

Solution code:
def main():

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

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

    # elif A > B:
    #     if (A-B) % (V-W) == 0 and (A-B) //(V-W) <= T:
    #         return "YES"
    #     else:
    #         return "NO"
    # elif A < B:
    #     if (B-A) % (V-W) == 0 and (B-A) //(V-W) <= T:
    #         return "YES"
    #     else:
    #         return "NO"

if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a >= b:
    print('NO')

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
import sys
import math
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    a, v = list(map(int,sys.stdin.readline().split()))
    b, w = list(map(int,sys.stdin.readline().split()))
    t = int(sys.stdin.readline())
    if a > b:
        temp = a
        a = b
        b = a
    af_a = v * t + a
    af_b = w * t + b
    if af_a >= af_b:
        print('YES')
    else: print('NO')


    return 0

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

if v-w <= 0:
    print("No")
    exit()

a_z = v*t+a
b_z = w*t+b

if a_z >= b_z:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

ans = 0
for i in  range(1,T+1):
    if A + i*V == B + i*W:
        ans = 1
        break
if ans ==1:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
from collections import *
from math import *

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

Submission status: Wrong Answer

Solution code:
def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    if W-V != 0 and 0 <= (A-B)/(W-V) <= T:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
'''     ##     ##  #######  # #  ######
        ##     ##  ##   ##  ###    ##
        ##     ##  ##    #  # #    ##
        #########  #######  # #    ##    '''

import sys
import math
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())

def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end=" \ ")

MODPRIME = int(1e9+7); BABYMODPR = 998244353;

ONLINE_JUDGE = 1
if not ONLINE_JUDGE:
    sys.stdin = open("input.txt","r")  # <<<  Comment this line  >>> #
    sys.stdout = open("output.txt","w")  # <<<  Comment this line  >>> #
    sys.stderr = open("output.txt","w")  # <<<  Comment this line  >>> #

a, v = get_ints()
b, w = get_ints()
t = int(input())
f1 = a + (v*t)
f2 = b + (w*t)
if f2 >= f1:
    print("NO")
else:
    print("YES")

# for _testcases_ in range(int(input())):

'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS BY ME @luctivud ( UDIT GUPTA )
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
DO NOT PLAGIARISE.
TESTCASES:
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Wrong Answer

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

if A == B:
    print("Yes")
    exit()

for i in range(T):
    A += V
    B += W
    if A == B:
        print("Yes")
        exit()
    else:
        pass
    

print("No")

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
av=a
bw=b
ans='NO'

for i in range(t+1):
    av+=v
    bw+=w
    if av==bw:
        ans='YES'
        break

print(ans)

Submission status: Wrong Answer

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

T=n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

T=int(input())

sa=abs(A-B)
haya=V-W

if(sa<=0):
    print('No')
elif(sa<=haya*T):
    print('Yes')
    exit()
else:
    print('No')

Submission status: Wrong Answer

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

if a+v*t >= b+w*t:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
e=int(input())
if  a+b*e>=b+d*e:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
#import numpy as np
import re
import math
from collections import defaultdict
from collections import deque
import collections
from fractions import Fraction
import bisect
from queue import PriorityQueue
import itertools
from copy import deepcopy
import random
import time
import os
import sys
import datetime
from functools import lru_cache
from functools import reduce
readline=sys.stdin.readline
sys.setrecursionlimit(2000000)
alphabet="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):
    if b:print("yes")
    else:print("no")
def Yn(b):
    if b:print("Yes")
    else:print("No")
def YN(b):
    if b:print("YES")
    else:print("NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(bbool,ret1,ret2):
    if bbool:return ret1
    else:return  ret2
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def pm(x):
    return x//abs(x)
def inputintlist(): 
    return list(map(int,input().split()))
def inputfloatlist(): 
    return list(map(float,input().split()))
def tozero(A):
    ret=[None]*len(A)
    for a in range(len(A)):
        ret[a]=A[a]-1
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])#[cost,x]
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)#x→yが複数ある場合のためにmin()する
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def ruisekiwa(A):
    ret=[0]*(len(A)+1)
    for a in range(len(A)):
        ret[a+1]=ret[a]+A[a]
    return ret
def getmd(x1,y1,x2,y2):
    return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):
    return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def heron(a,b,c):
    s=(a+b+c)/2
    S=s(s-a)(s-b)(a-c)
    S=math.sqrt(S)
    return S
def getAreaOfTriangle(x1,y1,x2,y2,x3,y3):
    a=geted(x1,y1,x2,y2)
    b=geted(x2,y2,x3,y3)
    c=geted(x3,y3,x1,y1)
    return heron(a,b,c)






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


A,V=inputintlist()
B,W=inputintlist()
T=int(input())
f=False
if V==W:
    if A==B:
        f=True
    else:
        f=False
elif V>W:
    f=True
else:
    f=False
YN(f)

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

def solve():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())
    if V-W >0 and abs(A-B)/V-W <= T:
        return 'YES'
    return 'NO'

if __name__ == '__main__':
    print(solve())

Submission status: Wrong Answer

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

if a>b:
  muki=-1
else:
  muki=1

at=a+v*muki*t
bt=b+w*muki*t

if muki:
  if at>bt:
    print("YES")
  else:
    print("NO")
else:
  if at<bt:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if A == B:
    print('Yes')
elif W >= V:
    print('No')
else:
    C = abs(A-B)//(V-W)
    if C <= T:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

a=V*T+A
b=W*T+B

if a>=b:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


def main():
    A, V = readnums()
    B, W = readnums()
    T = readint()
    if V <= W:
        print('NO')
    elif abs(A - B) // (V - W) <= T:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
A, V = (int(i) for i in input().split())
B, W = (int(i) for i in 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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    A, V = map(int, input().strip().split(" "))
    B, W = map(int, input().strip().split(" "))
    T = int(input().strip())

    if B + W * T <= A + W * T:
        print("YES")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
ans = "NO"
for i in range(t):
    a+=v
    b+=w
    if a==b:
        ans = "YES"
print(ans)

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
ans = "No"
if A < B:
  x = A + V * T
  y = B + W * T
  if x >= y:
    ans = "Yes"
else:
  x = A - V * T
  y = B - W * T
  if x <= y:
    ans = "Yes"
print(ans)

Submission status: Wrong Answer

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

kyori = abs(A - B)

if kyori + W * T <= V * T:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

t = int(input())

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

Submission status: Wrong Answer

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

T=n=int(input())

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