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 = map(int, input().split())
b,w = map(int, input().split())
t = int(input())

distance = b - a
speed_remainder = v - w

if distance <= abs(t * speed_remainder):
    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())

MAX = 10**9
MIN = -(10**9)

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

if abs(V - W) % 2 == 0:
    if abs(A - B) % 2 == 1:
        print("NO")
        exit()

if A >= B:
    A_after_T = max(MIN, A-V*T)
    B_after_T = max(MIN, B-W*T)
    if A_after_T <= B_after_T:
        print("YES")
    else:
        print("NO")
else:
    A_after_T = min(MAX, A+V*T)
    B_after_T = min(MAX, B+W*T)
    if A_after_T >= B_after_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())
re1 = (t*v) + a
re2 = (t*w) + b
if re1 - re2 >=0  :
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
oni, oni_spd = list(map(int, input().split()))
child, child_spd = list(map(int, input().split()))
T = int(input())

dist = abs(child - oni)
ofs_spd = oni_spd - child_spd

if ofs_spd * T >= dist and dist / ofs_spd % 2 == 0 and 0 <= dist / ofs_spd <= T:
    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())
if V == W:
    print('NO')
    exit()

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

if t > T or t < 1:
    print('NO')
    exit()

print('YES')

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
count = 0       
if a%2 == 0 and b%2!=0 and v%2==0 and w%2==0 or a%2 != 0 and b%2==0 and v%2==0 and w%2==0:
    pass
else:
    for _ in range(1, t+1):
        if a < b:
            a += v
            if a <= b:
                b -= w
            else:
                b += w
            if a == b:
                count = 1
                break
            else:
                pass
        else:
            a -= v
            if a <= b:
                b -= w
            else:
                b += w
            if a == b:
                count = 1
                break
            else:
                pass
print("Yes" if count == 1 else "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):
  # ans = t + 1
  print("NO")
else:
  ans = (b - a) / (v - w)
  if t >= ans:
    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()))

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

if speed <= 0:
  print('NO')
  exit()
  
if distance % speed == 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())

if W-V!=0:
	if B>A:
		if (A-B)/(W-V)>0 and (A-B)/(W-V)==(A-B)//(W-V):
			print("YES")
		else:
			print("NO")
	else:
		if (B-A)/(W-V)>0 and (B-A)/(W-V)==(B-A)//(W-V):
			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())
velocity = w-v
dist = b-a
if velocity == 0:
    print('NO')
elif (a < b) and (v < w):
    print('NO')
elif (a>b) and (v<w):
    print('NO')
elif abs(dist) % abs(velocity) == 0 and abs(dist // velocity) <= t :
    print('YES')
else :
    print('NO')

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if pase <= 0 or oniend < kid:
    return "NO"
  elif ((oniend - kid) % pase) == 0:
    return "YES"
  

in1 = input().split()
in2 = input().split()
in3 = input()
oni = int(in1[0])
onispeed = int(in1[1])
kid = int(in2[0])
kidspeed = int(in2[1])
time = int(in3)

pase = onispeed - kidspeed
oniend = (pase * time) + oni

print(calc(oniend,kid,pase))

Submission status: Wrong Answer

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

if v <= w:
    print('NO')

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

oni = a + v * t
nige = b + w * t

if oni == nige:
    print('YES')
    sys.exit()

if a <= b:
    if oni >= nige:
        for i in range(int(t/2)):
            a = a + v
            b = b + w
            oni = oni - v
            nige = nige - w
            if oni == nige or a == b:
                print('YES')
                sys.exit()
            elif oni <= nige or a >= b:
                print('NO')
                sys.exit()
    else:
        print('NO')
else:
    if oni <= nige:
        for i in range(int(t/2)):
            a = a + v
            b = b + w
            oni = oni - v
            nige = nige - w
            if oni == nige or a == b:
                print('YES')
                sys.exit()
            elif oni >= nige or a <= b:
                print('NO')
                sys.exit()
    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())
ans=0

if A>B:
    C=A
    A=B
    B=C

if A==B:
    print("YES")
else:

    if V<=W:
        print("NO")
    else:
        x=(1-(A-B)/(V-W))
        xint=math.floor(1-(A-B)/(V-W))
        A=A+(xint-1)*V
        B=B+(xint-1)*W

        if (xint-1)>=T:
            print("NO")
        else:
            for i in range (2):
                if A<B:
                    A=A+V
                    B=B+W
                else:
                    A=A-V
                    B=B-W
                if xint-1+i>T:
                    ans=0
                    break
                if A==B:
                    ans=1
                    break
                

            print("YES" if ans==1 else "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:
    ArriveTime = float(100000000000000)
else:
    ArriveTime = float((B-A)/(V-W))
    if ArriveTime < 0:
        ArriveTime = float(100000000000000)

# print(str(ArriveTime))
if T >= ArriveTime:
    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:
s1 = input().split()
intA = int(s1[0])
intV = int(s1[1])

s2 = input().split()
intB = int(s2[0])
intW = int(s2[1])

s3 = input().split()
intT = int(s3[0])

if (intW >= intV ) :
    if (intB > intA) :
        print('NO')
        exit()

if (intV >= intW ) :
    if (intA > intB) :
        print('NO')
        exit()

intDiv = abs(intB - intA)
intSpd = abs(intV - intW)
if (intSpd*intT > intDiv) :
    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())
oni = v * t
nige = w * t

if oni + a >= nige + b:
  print("YES")
elif oni + a == nige + b:
   print("YES")
else:
  print("NO")
if b < 0:
  print("YES")

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
oni = [a + (i*v -(t-i)*v) for i in range(t+1)]
nige = [b + (i*w -(t-i)*w) for i in range(t+1)]
print(oni)
print(nige)
if set(oni).intersection(set(nige)):
    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 <0 and b >=0:

    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 = (int(x) for x in input().split())
B,W = (int(x) for x in input().split())
T = int(input())
Flag = False
if V>W:
    if (A-B)%(V-W)==0 or (V-W)==1:
        Flag = True
if Flag:
    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("NO")

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

elif B < A:
  if W <= V:
    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 V < W:
  print("NO")
else:
  set_position = abs(B-A)
  move         = abs(V-W)
  if move == 0:
    print("NO")
  else:
    answer       = divmod(set_position, move)

    if answer[1] == 0:
      if answer[0] <= 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())


if (v <= w and b > a) or (v >= w and b < a):
  # ans = t + 1
  print("NO")
else:
  ans = (b - a) / (v - w)
  if t >= ans:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

Solution code:
# 鬼がA1秒あたりV、子はB1秒あたりW T秒以内
a, v = map(int,input().split())
b, w = map(int,input().split())
t = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys

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

oni = a + v * t
nige = b + w * t

if oni == nige:
    print('YES')
    sys.exit()

if a <= b:
    if oni >= nige:
        for i in range(int(t/2)):
            a = a + v
            b = b + w
            oni = oni - v
            nige = nige - w
            if oni == nige or a == b:
                print('YES')
                sys.exit()
            elif oni <= nige or a >= b:
                print('NO')
                sys.exit()
    else:
        print('NO')
else:
    if oni <= nige:
        for i in range(int(t/2)):
            a = a + v
            b = b + w
            oni = oni - v * t
            nige = nige - w * t
            if oni == nige or a == b:
                print('YES')
                sys.exit()
            elif oni >= nige or a <= b:
                print('NO')
                sys.exit()
    else:
        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

v = a_v - b_v
l = b - a

if l==0:
  print('YES')
elif v==0:
  print('NO')
elif v*t>=l and l%v == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
oni = input().split()
kodomo = input().split()
limit_time = int(input())

oni_ichi = int(oni[0])
oni_move = int(oni[1])

kodomo_ichi = int(kodomo[0])
kodomo_move = int(kodomo[1])

move_dir_num = oni_ichi - kodomo_ichi

if move_dir_num >= 0:
  res = (kodomo_ichi - kodomo_move * limit_time) - (oni_ichi - oni_move * limit_time)
else:
  res = (kodomo_ichi + kodomo_move * limit_time) - (oni_ichi + oni_move * limit_time)
  
if res < 0:
  print("YES")

if res >= 1:
  print("NO")

Submission status: Wrong Answer

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

def check():
  deltaD=B-A
  deltaV=V-W
  if deltaD<0:
    return 'NO'  
  if deltaD==0:
    return 'YES'
  if deltaV<=0:
    return 'NO'
  if deltaV>=0:
     if T*deltaV >deltaD:
       return 'YES'
  return 'NO'

print(check())

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:
        x = (b-a)/(v-w)
    else:
        return 'NO'
    
    if abs(x) <= t and int(x)*v + a == int(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())
re1 = (t*v) 
re2 = (t*w) 
if re1 - re2 >=0  :
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())
e = a[1]-b[1]
g = 0
if e == 0 or e <= 0:
  print("NO")
  g = 1
f = a[0]
for i in range(c+1):
  f += e
  if f == b[0]:
    print("YES")
    g =1
if g == 0:
  print("NO")

Submission status: Wrong Answer

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

#逃げている
b,w=map(int,input().split())

#t秒以内
t=int(input())

if v==w:
    print("NO")
    exit()

from math import gcd
g=gcd(v,w)
v=v//g
w=w//g

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

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

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

if B < A:
  if W <= V:
    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 V == W or V - W <= 0:
    print("NO") 
    
elif 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())
ans="NO"
if v!=w:
  if (b-a)%(w-v)==0 and (b-a)//(w-v)<0 and abs(b-a)//abs(w-v)<=t:
    ans="YES"
print(ans)

Submission status: Wrong Answer

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

if V*T <= W*T:
    print("NO")
elif A > B:
    if A - V*T > B - W*T:
        print ("NO")
    else:
        print("YES")
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())
k=0
for i in range(t):
  if a+i*v==b+i*w or (a+i*v)>(b+i*w):
    print("YES")
    k=1
    break
  elif (a+i*v-b-i*w)>w+b:
    break
  elif (b+i*w-a-i*w)>v+a:
    break
if k==0:
  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:
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t=int(input())
-10^9<=a,b<=10^9
1<=v,w<=10^9
1<=t<=10^9
a!=b
x=b-a
y=w-v
z=y/x

if z<=t:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
# 鬼がA1秒あたりV、子はB1秒あたりW T秒以内
a, v = map(int,input().split())
b, w = map(int,input().split())
t = int(input())

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

Submission status: Wrong Answer

Solution code:
oniA,oniV = map(int,input().split())
runnerB,runnerW = map(int,input().split())
T = int(input())
if oniV*T+oniA >= runnerW*T+runnerB:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
c,d=map(int,input().split())
t=int(input())
if b!=d:
	i=(a-c)/(d-b)
	x=math.floor(i)-i
	if x==0 and i<=t and i>=0:
		print("YES")
	else :
		print("NO")
else :
	if a==c:
		print("YES")
	else:
		print("NO")

Submission status: Wrong Answer

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

    ans = 'NO'

    if V > W:
        if A > B:
            t = (B-A)/(W-V)
        else:
            t = (B - A) / (V - W)
            
        if t <= T and is_integer(t):
            print(t)
            ans = 'YES'

    print(ans)

def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

if B < A:
    if mob <= 0:
        print("No")
    else:
        if dis - mob*T <= 0:
            print("Yes")
        else:
            print("No")
elif A < B:
    if mob >= 0:
        print("No")
    else:
        if dis + mob*T <= 0:
            print("Yes")
        else:
            print("No")
elif A == B:
    print("Yes")

Submission status: Wrong Answer

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

def check():
  deltaD=B-A
  deltaV=V-W
  if deltaD<0:
    return 'NO'  
  if deltaD==0:
    return 'YES'
  if deltaV<=0:
    return 'NO'
  if deltaV>0:
     if T*deltaV >deltaD:
       return 'YES'
print(check())

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 w < v and (b-a)%(v-w)==0 and int((a-b)/(w-v)) <= t:
    print("YES")
  else:
    print("NO")
else:
  if w > v and (a-b)%(w-v)==0 and int((a-b)/(w-v)) <= 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())
 
for i in range(1,T+1):
    if A < B and V <= W:
        print("NO")
        break;
    d = (B-A)-((V-W)*i)
    if d <= 0:
        print("YES")
        break;
    elif d != 0 and i == T+1:
        print("NO")

Submission status: Wrong Answer

Solution code:
import sys

n = list(map(int,input().split()))
r = list(map(int,input().split()))
t = int(input())

A = n[0]
V = n[1]

B = r[0]
W = r[1]

T = t

after_a = A + V * T
after_b = B + W * T

if after_a == after_b:
    print('YES')
    sys.exit()
if A < B and after_a > after_b:
    target = ['YES' if (A + V * i) - (B + W * i) == 0  else 'NO' for i in range(T)]
    print(target[-1])
    sys.exit()
if A > B and after_a < after_b:
    target = ['YES' if (A + V * i) - (B + W * i) == 0  else 'NO' for i in range(T)]
    print(target[-1])
    sys.exit()
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<b and (b-a)/(v-w)<=t:# and (b-a)/(v-w)==(b-a)//(v-w):
    print('YES')
    #print((b-a)/(v-w))
elif b<a 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 W-V!=0:
	if ((A-B)/(W-V)>0 and (A-B)/(W-V)==(A-B)//(W-V)) or ((B-A)/(W-V)>0 and (B-A)/(W-V)==(B-A)//(W-V)):
		print("YES")
	else:
		print("NO")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.readline
 
def main():
    A, V = map(int, readline().split())
    B, W = map(int, readline().split())
    T = int(input())
 
    if V <= W:
        print('NO')
        return
 
    for _ in range(T):
        if A == B:
            print('YES')
            return
        else:
            A += V
            B += W
    print('NO')
    
main()

Submission status: Wrong Answer

Solution code:
import numpy as np
#数値型を分割して取り出し
A, V = map(int, input().split())
B, W = map(int, input().split())
#数値型の取り出し
T = int(input())
AA = A
BB = B
u = np.array([i for i in range(1,T+1)])

ans = "NO"
for i in u:
  if BB > AA:
    AA += V
  else:
    AA -= V    
  if BB + W >= AA:
    BB += W
  else:
    BB -= W
  if AA == BB:
    ans = "YES"
    break
print(ans)

Submission status: Wrong Answer

Solution code:
x=input().split()
a=int(x[0])
v=int(x[1])
y=input().split()
b=int(y[0])
w=int(y[1])
t=int(input())
da=v*t
db=w*t
fa=da+a
fb=b+db
if fa>fb:
    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 V == W:
    print("NO")
elif 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 (v == w) or (v <= w and b > a) or (v >= w and b < a):
  ans = t + 1
else:
  ans = (b - a) / (v - w)


if t >= ans:
  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 = input()
for i in range(1, int(t)+1):
  m = a + v * i
  n = b + w * i
  if m - n == 0:
    ans = 'YES'
    break
  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 a+v*t < b+w*t:
    result = "NO"
else:
    result = "YES"
print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    if w>v:
        return "NO"
    elif w==v:
        res = a+(v*(t+1))-b+(w*t)
        if res>-1:
            return "YES"
        return "NO"
    else:
        res = a+(v*t)-b+(w*t)
        if res>-1:
            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    = int(input())

if V < W:
  print("NO")
else:
  set_position = B-A
  move         = V-W
  if move == 0:
    print("NO")
  else:
    answer       = divmod(set_position, move)

    if answer[1] == 0:
      if answer[0] <= 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:
  if b - a <= (v-w) * t:
    print('YES')
  else :
    print('NO')

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

Submission status: Wrong Answer

Solution code:
A = input().split()
A_pos = int(A[0])
A_v = int(A[1])

B = input().split()
B_pos = int(B[0])
B_v = int(B[1])

T = int(input())

if(A_v <= B_v):
  if(A_pos<B_pos):
    print("No")
  else:
    print("Yes")
else:
  dif_v = A_v - B_v
  if(dif_v * T >= B_pos - A_pos):
    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("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
ABVW = [map(int, input().split()) for _ in range(2)]
AB, VW = [list(i) for i in zip(*ABVW)]
T = int(input())

print(AB)
print(VW)
print(T)

if VW[0] == VW[1]:
    print("NO")
else:
    if abs(AB[1] - AB[0]) + VW[1]*T - VW[0]*T <= 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())

a_data = [a + i * v for i in range(t+1)]
b_data = [b + i * w for i in range(t+1)]

for a,b in zip(a_data, b_data):
    if a == b:
        print('YES')
        exit()
print('NO')

Submission status: Wrong Answer

Solution code:
A, W = map(int,input().split())
B, V = map(int,input().split())
T = int(input())
flag = "NO"
mid = T//2
i = 1
while True:
    i += 1
    a = A + W*mid
    b = B + V*mid
 
    if a == b:
        flag = "YES"
        break
    elif T//(2**(i-10)) == 0:
        break
    elif T//(2**i) == 0:
        if a > b:
            mid = mid - 1
            if mid < 1:
                mid = 1
        elif a < b:
            mid = mid + 1
            if mid > T:
                mid = T
    elif a > b:
        mid = mid - T//(2**i)
    elif a < b:
        mid = mid + T//(2**i)

print(flag)

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    if w>=v:
        return "NO"
    elif w==v:
        res = a+(v*(t+1))-b+(w*t)
        if res>-1:
            return "YES"
        return "NO"
    else:
        res = a+(v*t)-b+(w*t)
        if res>-1:
            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 = input().split(' ')
a = int(a)
v = int(v)
b, u = input().split(' ')
b = int(b)
u = int(u)
t = int(input())


if a <= b and a + v * t >= b + u * t :
  print('YES')
elif a > b and a + v * t <= b + u * 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())

def check():
  deltaD=B-A
  deltaV=V-W
  if deltaD<0:
    return 'NO'  
  if deltaD==0:
    return 'YES'
  if deltaV<=0:
    return 'NO'
  if deltaV>0:
     if T>= deltaD//deltaV:
       return 'YES'
print(check())

Submission status: Wrong Answer

Solution code:
a, v = [float(s) for s in input().split(" ")]
b, w = [float(s) for s in input().split(" ")]
t = float(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 and l >= k:
      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())
dis = abs(A-B)
mob = W-V

if B < A:
    if mob <= 0:
        print("No")
    else:
        if dis % mob != 0:
            print("No")
        else:
            if dis - mob*T <= 0:
                print("Yes")
            else:
                print("No")
elif A < B:
    if mob >= 0:
        print("No")
    else:
        if dis % mob != 0:
            print("No")
        else:
            if dis + mob*T <= 0:
                print("Yes")
            else:
                print("No")
elif A == B:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
a,v=list(map(int,input().split()))
b,w=list(map(int,input().split()))
t=int(input())
if v-w==0:
  if a==b:
    print("YES")
  else:
    print("NO")
  sys.exit()
temp=(b-a)/(v-w)
if temp>t:
  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())
if (V-W)*T < (B-A):
  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 a+v*t >= b+w*t:
  if a < b and w < v and (b-a)%(v-w)==0 and int((a-b)/(w-v)) <= t:
    print("YES")
  elif a > b and w > v and (a-b)%(w-v)==0 and int((a-b)/(w-v)) <= t:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x=input().split()
a=int(x[0])
v=int(x[1])
y=input().split()
b=int(y[0])
w=int(y[1])
t=int(input())
da=v*t
db=w*t
fa=da+a
fb=b+db
if fa>=fb:
    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))<(c+(d*e)):
    print('NO')
else:
    print('YES')
if a>c:
    if b>c:
        if a-(b*e)<=(c-(d*e)):
            print('YES')

Submission status: Wrong Answer

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

if abs(A[0]-B[0])+B[1]*T>A[1]*T:
       print("No")
else:
       print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

a,v = LI()
b,w = LI()
T = I()

if(a > b):
    diff = a - b
    diff2 = v - w
    if(diff2 <= 0):
        print('NO')
    else:
        if(diff // abs(diff2) <= T):
            print('YES')
        else:
            print('NO')
else:
    diff = b - a
    diff2 = v - w
    if(diff2 <= 0):
        print('NO')
    else:
        if(diff // abs(diff2) <= 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())

l = abs(A-B)
d = V - W
if d <= 0:
  print("NO")
elif l % d != 0:
  print("NO")
elif l // d <= 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 + W * T:
    print("NO")
    sys.exit()

for i in range(T):
    A += V 
    B += W 
    if A == B:
        print("YES")
        sys.exit()
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())
if V == W:
    print('NO')
    exit()

t, mod = divmod((A - B) ,(W - V))


if mod != 0:
    print('NO')
    exit()
if t > T or t < 1:
    print('NO')
    exit()

print('YES')