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:
A,V = input().split()
B,W = input().split()

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

T = int(input())

distance = B-A
closer = W-V

def solve():
    if closer >= 0:
        print("NO")
        return
    time = distance/abs(closer)
    if time <= T:
        print("YES")
        return
    else:
        print("NO")
        return
solve()

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
re1 = (t*v) + a
re2 = (t*w) + b
if re1 > re2 :
    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=abs(a-b)

f=0

for i in range(0,t):
  for x in range(0,1):
    z=(v+w)*x+abs(v-w)*(i-x)
    if z == d:
      f=1

if f == 1:
	print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
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)
S = V-W
if S>0 and D/S <= 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())
time=[i for i in range(T+1)]
x=0

for j in time:
    if A==B:
        x=1
        print("YES")
        break
    A=A+V
    B=B+W
    
if x!=1:
    print("NO")

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 13~06~2020
"""

import sys
from bisect import *
from math import floor, sqrt, ceil, factorial as F, gcd, pi
from itertools import chain, combinations, permutations, accumulate
from collections import Counter, defaultdict, OrderedDict, deque

INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize) - 1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a, b: (a * b) // gcd(a, b)
setbit = lambda x: bin(x)[2:].count("1")
INT = lambda type: type(sys.stdin.readline()) if type in [int, float] else type(sys.stdin.readline()).replace("\n", "")
ARRAY = lambda type: list(map(type, sys.stdin.readline().split()))
NUMS = lambda type: map(type, sys.stdin.readline().split())


def solve():
    a,v = NUMS(int)
    b,w = NUMS(int)
    t = INT(int)
    if v == w:
        print("YES" if a == b else "NO")
    else:
        if 1 <= abs(a-b)/abs(w-v) <= t:
            print("YES")
        else:
            print("NO")





if __name__ == "__main__":
    solve()



"""a+v*t = b+w*t
a - b = t*(w-v)"""

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 abs(A + V*T) < abs(B + W*T):
  	print("NO")
  else:
    print("YES")
else:
  if abs(A - V*T) > abs(B - W*T):
  	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")
else:
    for i in range(1,t+1):
        if a+(v*i)==b+(w*i):
            print("YES")
            exit()
    print("NO")

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
x1=a+t*v
y1=b+t*w
if(x1>=y1 or 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 V <= W:
	print("No")
	exit()
L=abs(B-A)
vd=abs(V-W)

if L <= vd*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):
  print('NO')
elif (A + (V * T) > B + (W * T)):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 20:58:10 2020

@author: sd18016
"""

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

kyori = B-A
miji = V-W 
if V == W:
    print("NO")
else:
    if kyori % miji == 0:
        a = kyori // miji
        if 1 <= a <= T:
            print("YES")
        else:
            print("NO")
    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 = abs(B-A)
Y = abs(V-W)

if Y == 0 or X%Y != 0:
    print('NO')
else:
    if Y*T >= X:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
A, V = [int(n) for n in input().split()]
B, W = [int(n) for n in input().split()]
T = int(input())

if V <= W:
    print('NO')
    exit()

for t in range(1, T+1):
    if B > A:
        B = B + W
        A = A + V
    else:
        B = B - W
        A = A - V
    if A == B:
        print('Yes')
        exit()
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:    
    L = abs(B - A)
    if T * (V - W) >= L :
        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"
if v!=w:
  if (b-a)%(w-v)==0 and (b-a)//(w-v)<0 and abs((b-a)//(w-v))<=t:
    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())
re1 = (t*v) + a
re2 = (t*w) + b
if re1 >= re2 :
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    l =abs(a - b)
    s=abs(v - w)

    if w >= v or l // s > t:
        print("NO")
    else:
        if l %  s == 0:
            print("YES")
        else:
            l2= l%s 
            t2 = t- l//s
            flag = False
            
            for i in range(t2):
                l2= abs(l2-s)
                if l2 ==0:
                    flag=True
                    break

            if flag :
                print("YES")
            else:
                print("NO")

Submission status: Wrong Answer

Solution code:
a, v = input().split(" ")
b, w = input().split(" ")
t = int(input())
if a == b:
    print("YES")
elif a < b:
    if int(a) + int(v) * t < int(b) + int(w) * t:
        print("NO")
    else:
        print("YES")
else:
    if int(a) - int(v) * t > int(b) - int(w) * t:
        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 W >= V:
  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())

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

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = int(input())
aw = a[0]+a[1]*t
bw = b[0]+b[1]*t
diff = a[1]-b[1]
count = 0
for i in range(1, t+1):
  if (a[0]+diff*i) == b[0]:
    count = 1
    break
if count == 1:
  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    = int(T) * V
b    = int(T) * W
for i in range(T+1):
  if (A + a) >= (B + b):
    print("YES")
    break
else:
  print("NO")

Submission status: Wrong Answer

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

    if (v-w) > 0 and (b-a) > 0:
        x = (b-a)/(v-w)
    elif (v-w) < 0 and (b-a) < 0:
        x = (b-a)/(v-w)
    else:
        return 'NO'
    
    if x <= t and x*v + a == x*w + b:
        return 'YES'

    return 'NO'


print(solve())

Submission status: Wrong Answer

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

c = abs(b-a)
x = v - w


if x <= 0:
    print("NO")
    exit()

if c % x == 0 and c <= x * t and x <= 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())
flag = False
for i in range(1,T+1):
  if A+V*i == B+W*i:
    flag = True
    break
if flag == True:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
A, V = [int(x) for x in input().split()]
B, W = [int(x) for x in input().split()]
T = int(input())

if A > B:
    V = -V
    W = -W

res = "NO"
for i in range(T+1):
    A += V
    B += W
    if A == B:
        res = "YES"
        break

print(res)

Submission status: Wrong Answer

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

if A<B:
  for i in range(T+1): 
    if A+V*i==B+W*i:
      print('YES')
      break
  else:
    print('NO')
elif B>A:
  for i in range(T+1): 
    if A-V*i==B-W*i:
      print('YES')
      break
  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 W-V>0 and abs(B-A)>T*abs(W-V):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()

X = (A - B)/(W - V)

if 0 < X <= T and X == int(X):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
AV = list(map(int,input().split()))
BW = list(map(int,input().split()))
T = int(input())

A = AV[0]
V = AV[1]
B = BW[0]
W = BW[1]

pos_A = A
pos_B = B

if A <= B:
    pos_B = B + T*W
    pos_A = A + T*V
    if pos_A >= pos_B:
        print('Yes')
    else:
        print('No')
else:
    pos_B = B - T*W
    pos_A = A - T*V
    if pos_A <= pos_B:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

pos_o = A
pos_n = B

if A < B:
    position_flag = True
else:
    position_flag = False

for i in range(T):
    pos_o += V
    pos_n += W
    if pos_o == pos_n:
        print('YES')
        exit()
    if position_flag:
        if pos_o > pos_n:
            print('NO')
            exit()
    else:
        if pos_n < pos_o:
            print('NO')
            exit()

print('NO')

Submission status: Wrong Answer

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(v+w))%1 == 0 and t >= abs(a-b)/(v+w) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
        if w < v:
            if ((b-a)/(w-v))%1 == 0 and t >= ((b-a)/(w-v)) >= 0:
                bit = 1
                if a - v * ((b-a)/(w-v)) < 0:
                    bit = 0
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
        if v > w:
            if ((a-b)/(v-w))%1 == 0 and t >= ((a-b)/(v-w)) >= 0:
                bit = 1
                if b - v * ((a-b)/(v-w)) < 0:
                    bit = 0
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

tiji = abs(W-V)
kyori = abs(A-B)

migiiku = False
tukamae = False
if B>A:
    migiiku=True

if W>=V and A!=B:
    print('NO')
elif T*tiji < kyori:
    print('NO')
else:
    for i in range(1,T+1):
        if migiiku:
            A +=V
            B +=W
        else:
            A -= V
            B -= W
        
        if A==B:
            tukamae = True
            break
    
    if tukamae:
        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:
    w=abs(w)
    v=abs(v)
else:
    w=(abs(w)*(-1))
    v=(abs(v)*(-1))

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())
P = 0

if (-10**9 <= A <= 10**9) and (-10**9 <= B <= 10**9) and (1 <= V <= 10**9) \
and  (1 <= W <= 10**9) and (1 <= T <= 10**9) and (A != B) and type(A) == int and\
type(B) == int and type(V) == int and type(W) == int and type(T) == int:
    
    for i in range(T): 
        if A > B:
            A -= V
            B -= W
            
        
        elif A < B:
            A += V
            B += W

        elif A == B:
            print("YES")
            break
    
    if A != B:
        print("NO")

Submission status: Wrong Answer

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

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

T = int(input())

distance = B-A
closer = W-V

def solve():
    if closer >= 0:
        print("NO")
        return
    time = distance/abs(closer)
    if time <= T and B + W * time <= 10**9:
        print("YES")
        return
    else:
        print("NO")
        return
solve()

Submission status: Wrong Answer

Solution code:
num_input = [input() for i in range(3)]
a = int(num_input[0].split()[0])
v = int(num_input[0].split()[1])
b = int(num_input[1].split()[0])
w = int(num_input[1].split()[1])
t = int(num_input[2].split()[0])

hoge=b-a
if hoge<0:
    hoge=hoge*-1

if v-w<=0:
    ans="NO"
elif int(hoge/(v-w))<=t:
    ans="YES"
else:
    ans="NO"
    
print(ans)

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 v == w:
  print("NO")
else:
  if a > b and v > w:
    print("NO")
  elif b > a and w > v:
    print("NO")
  else:
    l = abs(b - a)
    k = abs(v - w)
    if k * t >= l:
      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())
  ans = True

  a_can_plus = min(a + v * t, 10 ** 8)
  a_can_minus = max(a - v * t, -10 ** 8)
  b_can_plus = min(b + w * t, 10 ** 8)
  b_can_minus = max(b - w * t, -10 ** 8)

  if v - w < 0: 
    ans  = False
  elif a > b:
    if b_can_minus < a_can_minus:
      ans = False
    else:
      ans = True  
  elif a < b:
    if a_can_plus < b_can_plus:
      ans = False
    else:
      ans = True
      
  if ans:
    print("YES")
  else:
    print("NO")            


main()

Submission status: Wrong Answer

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

distance = abs(a-b)
sa = v - w

if sa == 0:
  print('NO')
elif distance % sa != 0 and distance > t * sa:
  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())
ans=0
if a + v * t >= b + w * t:
  ans='YES'
else:
  ans='NO'
print(ans)

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

t = (B - A) / (V - W)

t_j = (B - A) // (V - W)

# print(t)
# print(t_j)

if t == t_j and t <= T and 0 < t:
    print('YES')
    exit()

print('NO')

Submission status: Wrong Answer

Solution code:
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

if a > b:
    a, b = b, a
    v, w = w, v

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

Submission status: Wrong Answer

Solution code:
# import math

# def lcm(x, y):
#     return (x * y) // math.gcd(x, y)

# def main():
#     A,V = [int(x) for x in input().split()]
#     B,W = [int(x) for x in input().split()]
#     T = int(input())
#     pA = A + V*T
#     pB = B + W*T
#     lcm = lcm(A,B))
#     if pA >= pB:
#         print('YES')
#     else:
#         print('NO')

def main():
    A,V = [int(x) for x in input().split()]
    B,W = [int(x) for x in input().split()]
    T = int(input())
    pA = A
    pB = B
    for _ in range(T):
        if pA <= pB and pB+W <= pA+V:
            print('YES')
            return
        pA += V
        pB += W
    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 abs(b-a)<= 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())

X = B-A
Y = V-W

if Y == 0 or X%Y != 0:
    print('NO')
else:
    if Y*T >= 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 <= (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 V - W == 0 and A != B:
    print('NO')
    exit()

if ((B - A) / (V - W)).is_integer() and ((B - A) / (V - W)) > 0:
    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 b > a:
    if a + v * t >= b + w * t:
        print("YES")
    else:
        print("NO")
else:
    if v > w:
        print("NO")
    else:
        if b + w * t >= a + 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())

A_ = A + V * T
B_ = B + W * T

if A == B:
  print('YES')
elif A > B:
  print('NO')
elif A < B and 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 (V*T)+A < (W*T)+B:
  print('NO')
tt =T/2
if tt%2 != 0:
    tt += 0.5
tt = int(tt)
for i in range(1,tt):
  if tt*V+A < tt*W+B:
    break
  if V*i+A >= W*i+B:
    print('YES')
    exit()
for i in range(tt,T):
  if V*i+A >= W*i+B:
    print('YES')
    exit()

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

X = (A - B)/(W - V)

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

Submission status: Wrong Answer

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

a = A
b = B

T = int(input())

if a < b:
    a += V * T
    b += W * T

if a < b:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if a>b or w>=v:
    print('NO')
    sys.exit()
for tt in range(1,t):
    res = (w - v) * tt + (b - a)
    if res == 0:
        print('YES')
        sys.exit()

print('NO')

Submission status: Wrong Answer

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

for i in range(1, T+1):
    if A2 < B2:
        A2 = A + V * i
        B2 = B + W * i
    elif A2 > B2:
        A2 = A - V * i
        B2 = B - W * i
    elif A2 == B2:
        print("YES")
        exit() 

print("NO")

Submission status: Wrong Answer

Solution code:
def solve():
	posA, speedA = map(int, input().split())
	posB, speedB = map(int, input().split())
	T = int(input())
	if posA + speedA * T >= posB + speedB * T:
		return "YES"
	return "NO"




def main():
	print(solve())


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

behind = B - A
move = V - W

if behind <= move * T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

if A < B and V < W or B < A and W < V:
    print("NO")
    sys.exit()
elif W == V and A != B:
    print(("NO"))
    sys.exit()
elif A == B:
    print("YES")
    sys.exit()

ans = (B-A)/(V-W)

if ans <= T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    it = a+(v*t+1)
    other = b+(w*t)
    if it > other:
        return "YES"
    return "NO"
 
if __name__ == "__main__":
    a,v = map(int,input().split())
    b,w = map(int,input().split())
    t = int(input())
    print(tag(a,b,v,w,t))

Submission status: Wrong Answer

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

d = b - a
d = int(d)
dv = v - w
dv = int(dv)
d = abs(d)
if dv != 0 and abs(d) % abs(dv) == 0 and abs(d) <= int(dv) * T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
# coding:utf-8
a,v = input().split()
b,w = input().split()
t = input()
 
move_a = int(v) * int(t) + int(a)
move_b = int(w) * int(t) + int(b)
 
if move_a >= move_b:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, V = map(int, readline().split())
B, W = map(int, readline().split())
T = int(readline())
if W >= V:
  print('NO')
  sys.exit()
if (abs(A-B)//(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())

sub_BA = B-A
sub_WV = W-V

if sub_WV == 0:
  print("NO")
elif (sub_BA * sub_WV) < 0 and sub_BA / sub_WV <= 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 B >= A:
    for i in range(T):
        if (B-A) == i*(V-W):
            print("YES")
            break
    else:
        print("NO")

else:
    for i in range(T):
        if (A - B) == i * (V -W):
            print("YES")
            break
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
time = 0
if (V != W):
    timeyosou = abs(B-A)/(V-W)

if (V <= W):
    if (A < B):
        time = (10**9-A)/V
    else:
        time = (10**9+A)/V
else:
    if (A < B):
        if ((10**9 - B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 - A)/V
    if (A > B):
        if ((10**9 + B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 + A)/V
if (T > time):
    print ("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

A,V = input().rstrip().split()
B,W = input().rstrip().split()
A,V,B,W = int(A),int(V),int(B),int(W)
T = int(input().rstrip())
s=0
for t in range(T):
  if B<A:
    A-=V
    B-=W
    if B>=A:
      print('Yes')
      s=1
      break
  else:
    B+=V
    A+=W
    if B<=A:
      print('Yes')
      s=1
      break

if s!=1:
  print('No')

Submission status: Wrong Answer

Solution code:
a, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())
flag=0
t_set = 0

if a-b==0 and a_v-b_v == 0:
  flag = 1
elif a-b==0 or a_v-b_v == 0:
  flag = 0
else:
  t_set = (a-b)/(b_v - a_v)

if t_set>0:
	if t_set<=t and 0<t_set:
  		flag = 1
	else:
  		flag = 0
        
if flag == 0:
  print('No')
else:
  print('Yes')

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

Submission status: Wrong Answer

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

position_diff = b-a
pace_diff = v-w

if position_diff < 0:
    print('NO')
elif position_diff == 0:
    if pace_diff >= 0:
        print('YES')
    else:
        print('NO')
else:
    if pace_diff <= 0:
        print('NO')
    elif pace_diff > 0:
        if pace_diff * t >= position_diff:
            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 = ["YES","NO"]

distance = abs(b-a)
speed = abs(v-w)

result = distance - speed * t
if result <= 0:
    print(ans[0])
elif result > 0:
    print(ans[1])

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)
dv = abs(v - w)

if v < w or dv * t < d or d % dv != 0:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

Solution code:
a,v= input().split()
a=int(a)
v=int(v)
b,w= input().split()
b=int(b)
w=int(w)
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 < B:
  if abs(A + V*T) < abs(B + W*T):
  	print("NO")
  else:
    print("YES")
else:
  if abs(A + V*T) > abs(B + W*T):
  	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:
from decimal import *
getcontext().prec = 28
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())

if w==v:
    print("NO")
    quit()
x=Decimal((a-b)/(w-v))
if 0<x and x<=t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

distance = abs(a-b)
sa = v - w

if sa == 0:
  print('NO')
elif distance % sa == 0 and distance < t * sa:
  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())
  ans = True
  vect = v - w
  if vect <= 0:
    ans = False
  else:
    if vect * t > abs(a - b):
      ans = True
    else:
      if (a + w * t > 10 ** 8 and b + v * t > 10 ** 8 and b > a):
        ans = True
      elif (a - w * t < -10 ** 8 and b - v * t < 10 ** 8 and b < a):
        ans = True
      else:
        ans = False
  if ans:
    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())
if v <= w:
  print('No')
else:
  if (v-w)*t >= abs(a-b):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

if v<=w:
    print("NO")
    sys.exit()

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

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if a<b:
    new_a = a + v*t
    new_b = b + w*t
    if new_a >= new_b:
        print("YES")
    else:
        print("NO")
elif a > b:
    new_a = a - v*t
    new_b = b - v*t
    if new_a <= new_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(b>a):
    d=b-a
    c=v-w
    if(c>0):
        if(d%c==0):
            if(d//c<=t):
                print("YES")
            else:
                print("NO")
        else:
            print("NO")
    else:
        print("NO")
else:
    d=a-b
    c=w-v
    if(c>0):
        if(d%c==0):
            if(d//c<=t):
                print("YES")
            else:
                print("NO")
        else:
            print("NO") 
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
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)
S = V-W
if S==0 and D == 0:
    print('Yes')
elif S>0 and D/S <= 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>=0:
  if (v-w)*t >= b-a:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
a,v = input().split()
b,w = input().split()
t = input()
 
move_a = int(v) * int(t) + int(a)
move_b = int(w) * int(t) + int(b)
 
if move_a > move_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 V > W and (V - W) * T > B - A:
  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())
T0 = 0
L = abs(A - B)
 
if W >= V:
  print('NO')
else:
  if L % (V - W) == 0 and L // (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):
  print('YES')
elif (V <= W):
  print('NO')
elif (A + (V * T) >= B + (W * T)):
  print('YES')
else:
  print('NO')