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 speed_remainder <= 0:
    print("NO")
elif distance <= t * speed_remainder:
    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]
p = b[0]-a[0]
if e == 0 or e <= 0:
  print("NO")
else:
  aa = a[0]+a[1]*c
  bb = b[0]+b[1]*c
  if p % e == 0:
    if aa >= bb:
      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())

if V == W:
    print('NO')
    
elif A > B and V > W:
    print('NO')
     
elif B > A and W > V:
    print('NO')

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

else:
    print('NO')

Submission status: Wrong Answer

Solution code:
c1, a = map(int, input().split(' '))
c2, b = map(int, input().split(' '))
t = int(input())

flag = False

if a == b or (b > a and c2 > c1):
	print("NO")
else:
	if c1 > c2:
		c1, a, c2, b = c2, b, c1, a
	s = (c2 - c1) / (a - b)
	if s%1 == 0 and s < t and s > 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())
v=V-W
l=B-A
if l>0:
  if l <= v*T:
      print("YES")
  else:
    print("NO")
else:
  if l <= 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) or (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(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:
    if(a>b):
        d=a-b
        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")

Submission status: Wrong Answer

Solution code:
import sys
a,v = map(int, sys.stdin.readline().rstrip("\n").split())
b,w = map(int, sys.stdin.readline().rstrip("\n").split())
t = int(sys.stdin.readline().rstrip("\n"))
h = 10**9 + 7
if a > b:
    print('NO')
else:
    a_trans = a + v * t
    b_trans = b + w * t
    if a_trans >= b_trans:
        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: 
    A,B = B,A
    V,W = W,V
    if W - V <= 0:
        print('NO')
    elif (A-B)%(W-V) == 0 and (A-B)//(W-V) <= T:
        print('YES')
    else:
        print('NO')
else:
    if W - V <= 0:
        print('NO')
    elif (A-B)%(W-V) == 0 and (A-B)//(W-V) <= T:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
A, a = input().split()
B, b = input().split()
T = input()

A = int(A)
a = int(a)
B = int(B)
b = int(b)
T = int(T)

distance = abs(A-B)
speed = a-b

if distance - speed * T <= 0:
    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())
    for i in range(T):
        if A == B:
            return('YES')
        if A > B:
            return('YES')
        A += V
        B += W
    return('NO')
print(main())

Submission status: Wrong Answer

Solution code:
oniA,oniV = map(int,input().split())
runnerB,runnerW = map(int,input().split())
T = int(input())
dist = runnerB-oniA
if oniV <= runnerW:
  print("NO")
elif dist-(oniV-runnerW)*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())

if((b-a) > 0):
  a = v*t
  b = w*t
  if(a >= b):
    print("YES")
  else:
    print("NO")
    
elif((b-a) < 0):
  a = (-1)*v*t
  b = (-1)*w*t
  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 = float(input())


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

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

if A < B and W < 0:
    W = -W

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

if a >= b:
    if A < B:
        print("YES")
    else:
        print("NO")
else:
    if A < B:
        print("NO")
    else:
        print("YES")

Submission status: Wrong Answer

Solution code:
ax, av = list(map(int, input().split()))
bx, bv = list(map(int, input().split()))
t = int(input())

for ti in range(0,t+1):
    if (ax + av * ti == bx + bv * ti ):
        print ('YES')
        break
else:
    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 a > b:
        if a + W < b + V:
            break
        elif T//(2**i) == 0:
            mid = mid - 1
            if mid < 1:
                break
        else:
            mid = mid - T//(2**i)
    elif a < b:
        if a - W > b - V:
            break
        elif T//(2**i) == 0:
            mid = mid + 1
            if mid > T:
                break
        else:
            mid = mid + T//(2**i)

print(flag)

Submission status: Wrong Answer

Solution code:
A,X=map(int,input().split())
B,Y=map(int,input().split())
T=int(input())
c=[]

for i in range(1,T+1):
  a=A+X*i
  b=B+Y*i
  if a==b:
    c.append(a)
if len(c)==1:
  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 A+V*T < B+W*T:
        return('NO')
    for i in range(T):
        if A == B:
            return('YES')
        if A > B:
            return('YES')
        A += V
        B += W
    return('NO')
print(main())

Submission status: Wrong Answer

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

if B < A:
    print("No")
    
else:
    if mob <= 0:
        print("No")
    else:
        if dis - mob*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())
k=00
if a>b:
	print("NO")
else:
	for i in range(t):
		if a+i*v==b+i*w or a+i*v>b+i*w:
			print("YES")
			k=1
			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())
 
for i in range(1,T+1):
    if (A < B and V <= W) or (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:
P = []
S = []
for i in range(2):
    pp, ss  = map(int, input().split())
    P.append(pp)
    S.append(ss)

A = P[0]
V = P[1]
B = S[0]
W = S[1]
T = int(input())

def run():
	if A < B:
		c = (B + V*T) - (A + W*T)
		if c <= 0 :
			return 'YES'
		else :
			return 'NO'
	else:
		c =  (B - V*T) - (A - W*T)
		if c >= 0 :
			return 'YES'
		else :
			return 'NO'
print(run())

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 (v < w):
  ans = (a - b) / (v - w)
  if t <= abs(ans):
    print("YES")
  else:
    print("NO")
else:
  ans = (b - a) / (v - w)
  if t >= ans:
    print("YES")
  else:
    print("test")
    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 W>=B:
    print('NO')
elif abs(A-B)>T*(V-W):
    print('NO')
elif V>=3:
    print('NO')
else:
    print('YES')

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 x == int(x) and abs(x) <= t and x*v + a == x*w + b:
        return 'YES'

    return 'NO'


print(solve())

Submission status: Wrong Answer

Solution code:
a = input().split()
b = input().split()
c = input()

if(int(b[0])>int(a[0])):
	if(int(b[1])>=int(a[1])):
		print("NO")
	else:
		length = int(b[0]) - int(a[0])
		v = int(a[1]) - int(b[1])
		times = length / v
		if(times <= int(c)):
			print("YES")
		else:
			print("NO")
else:
	if(int(b[1])<=int(a[1])):
		print("NO")
	else:
		length = -int(b[0]) + int(a[0])
		v = -int(a[1]) + int(b[1])
		times = length / v
		if(times <= int(c)):
			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):
  a = i * V
  b = i * W
  j = A + a
  k = B + b
  if j == k:
    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())
if A < B:
  if V <= W:
    print("NO")
  else:
    if A+V*T >= B+W*T:
      print("YES")
    else:
      print("NO")
else:
  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,a2= map(int,input().split())
b,b2= map(int,input().split())

A = a2/1
B = b2/1
T = int(input())
if  A*T >= B*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())

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

Submission status: Wrong Answer

Solution code:
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


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


def instr():
    s = input()
    return(list(s[:len(s)]))


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


a, v = invr()
b, w = invr()
t = inp()
if a < 0 and b < 0:
    a = a*-1
    b = b * -1


if abs(v - w) > 0:
    t2 = (a - b) / (w - v)
    if b < a:
        t2 = -(a-b) / (w + v)

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

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    if w>=v:
        return "NO"
    res = (a+(v*t))-(b+(w*t))
    if res<0:
        return "NO"
    return "YES"

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:
import math
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
flg = False
for i in range(1,t+1):
    a+=v
    b+=w
    if b-a>=(v-w)/2:
        print('YES')
        flg = True
        break
if flg == False:
    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 float(T) >= float(deltaD)/float(deltaV):
       return 'YES'
  return 'YES'

print(check())

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_pos>B_pos):
  if(A_v >= B_v):
    print("No")
  else:
    dif_v = B_v - A_v
    if(dif_v * T >= A_pos - B_pos):
      print("Yes")
    else:
      print("No")
else:
  if(B_v >= A_v):
    print("No")
  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:
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):
          if(diff % diff2 ==0):
            print('YES')
          else:
            print('NO')
        else:
            print('NO')
else:
    diff = b - a
    diff2 = v - w
    if(diff2 <= 0):
        print('NO')
    else:
        if(diff // abs(diff2) <= T):
          if(diff % diff2 == 0):
            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())

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

Submission status: Wrong Answer

Solution code:
c1, a = map(int, input().split(' '))
c2, b = map(int, input().split(' '))
t = int(input())

flag = False

if a == b or (b > a and c2 > c1):
	print("NO")
else:
	if c1 > c2:
		c1, a, c2, b = c2, b, c1, a
	for s in range(0, t):
		y1 = a*s + c1
		y2 = b*s + c2
		# print(y1, y2)
		if y1 == y2:
			flag = True
			break
	if flag is True:
		print("YES")
	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 >= 0) or (v*t <=l and l < 0) )and l%v == 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())
v=V-W
l=B-A
if l>0:
  if l <= v*T:
      print("YES")
  else:
    print("NO")
elif l==0:
  print("NO")
else:
  if l >= 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*t >= abs(b - a) + w*t:
    print("No")
else:
    print("Yes")

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
    print("aaaaaaaaaaaaa")

 
    if a == b:
        flag = "YES"
        break
    elif a > b:
        if a + W < b + V:
            break
        elif T//(2**i) == 0:
            mid = mid - 1
            if mid < 1:
                break
        else:
            mid = mid - T//(2**i)
    elif a < b:
        if a - W > b - V:
            break
        elif T//(2**i) == 0:
            mid = mid + 1
            if mid > T:
                break
        else:
            mid = mid + T//(2**i)

print(flag)

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:
    for i in range(1,t+1):
        if a-b == (w-v)*i:
            print('Yes')
            break

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if (pase <= 0) or ((oniend * pase) < kid):
    return "NO"
  #elif ((oniend - kid) % pase) == 0:
  else:
    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

if (pase <= 0) or ((oniend * pase) < kid):
  print("NO")
  #elif ((oniend - kid) % pase) == 0:
else:
  print("YES")

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]
p = b[0]-a[0]
if e == 0 or e <= 0:
  print("NO")
else:
  aa = a[0]+a[1]*c
  bb = b[0]+b[1]*c
  g = a[0]*e
  h = g-b[0]
  if p % e == 0:
    if aa >= bb:
      print("YES")
    else:
      print("NO")
  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())

a = a_v[0]
b = b_w[0]

pd = b - a
td = a_v[1] - b_w[1]
end = td * t
if end > pd:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    if w>=v:
        return "NO"
    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 a == b:
    print("YES")
    exit(0)

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

if a < b:
    t = (b-a) / (v-w)
    mod_t = (b-a) % (v-w)
else:
    t = (a-b) / (v-w)
    mod_t = (a-b) % (v-w)

if (0 < t <= T) and (mod_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())
c=0
if a == b:
    print("YES")
    c+=1
if a*b<0:
    d = a+b
else:
    d = a-b
if d < 0:
    d = -d
if v > w:
    d2 = v-w
else:
    d2 = w-v
if  (v > w) and (d2*t < d) and c==0:
    print("NO")
elif v <= w and c==0:
    print("NO")
elif c==0:
    print("YES")

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'
    x=int(x)
    if abs(x) >= 1 and abs(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())
for _ in range(1,t+1):
    a += v
    b += w
    if a == b:
        print('YES')
        break
else:
    print('NO')

Submission status: Wrong Answer

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

check=0
D=abs(B-A)
S=abs(V-W)

if V>W:
    a1=D//S
    a2=D%S
    for i in range(T-a1):
        a2=abs(a2-S)
        if a2==0:
            check=1
            break
    if check==1:
        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())


# 相対速度、距離
S = abs(V - W)
D = abs(A - B)
if(S == 0):
    print('NO')
    exit(0)

if((A > B and V > W) or (B > A and W > V)):
    print('NO')
    exit(0)


if(D / S > T or D % S != 0):
    print('NO')
    exit(0)
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 == b:
    ans = 1
if v == w:
    ans = 1
elif v>w and abs(a-b)/(v-w) <= t :
    ans = 1
if ans == 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())

if a>b:
	c=a-b
	if v>w:
		d=v-w
		s=d*t
		if c%s==0:
			print('YES')
		elif c%s!=0:
			print('NO')
	elif w>v:
		d=w-v
		s=d*t
		if c*s==0:
			print('YES')
		elif c%s!=0:
			print('NO')
	elif v==w:
		print('NO')

elif b>a:
	c=b-a
	if v>w:
		d=v-w
		s=d*t
		if c%s==0:
			print('YES')
		elif c%s!=0:
			print('NO')
	elif w>v:
		d=w-v
		s=d*t
		if c%s==0:
			print('YES')
		elif c%s!=0:
			print('NO')
	elif v==w:
		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())
count = 0       
if v <= w:
    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 = [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()

va = [A + V * t for t in range(1, T+1)]
va.extend([A - V * t for t in range(1, T+1)])
vb = [B + W * t for t in range(1, T+1)]
vb.extend([B - W * t for t in range(1, T+1)])

va_vb_and = set(va) & set(vb)

if va_vb_and is not None:
    print('YES')
    exit()
print('NO')

Submission status: Wrong Answer

Solution code:
def calc(oniend, kid , pase):
  if (pase <= 0) or ((oniend * pase) < kid):
    return "NO"
  #elif ((oniend - kid) % pase) == 0:
  else:
    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

if (kid-oni < 0) or (pase <= 0) or ((oniend * pase) < kid):
  print("NO")
  #elif ((oniend - kid) % pase) == 0:
else:
  print("YES")

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)

approach_rate = v-w

time = approach_rate

if approach_rate * time > sa:
    print("YES")
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:
A, V = list(map(int,input().split()))
B, W = list(map(int,input().split()))
T = int(input())
if V <= W:
  print('NO')
  exit()
while T>0:
  A+=V
  B+=W
  if A == B:
    print('YES')
    exit()
  T-=1
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 (v < w):
  ans = (a - b) / (v - w)
  print(ans)
  if t <= abs(ans):
    print("YES")
  else:
    print("NO")
else:
  ans = (b - a) / (v - w)
  if t >= 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 A == B:
  if V != W:
    print("NO")
  else:
    print("YES")

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

else:
  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 = (int(x) for x in input().split())
B,W = (int(x) for x in input().split())
T = int(input())
Flag = False
if V>W and (A-B)%(V-W)==0 and (A-B)//(V-W) <= T:
    Flag = True
    
if Flag:
    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:
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_pos>B_pos):
  if(A_v >= B_v):
    print("No")
  else:
    dif_v = B_v - A_v
    if(dif_v * T >= abs(A_pos - B_pos)):
      print("Yes")
    else:
      print("No")
else:
  if(B_v >= A_v):
    print("No")
  else:
    dif_v = A_v - B_v
    if(dif_v * T >= abs(B_pos - A_pos)):
      print("Yes")
    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')
elif v<0 and l<0:
  if int((-1*l)/(-1*v))==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 V == W:
    print('NO')
    
elif A > B and V > W:
    print('NO')
     
elif B > A and W > V:
    print('NO')

elif A > B and W > V and (A-B) % (W-V) == 0:
    print('YES')
    
elif B > A and V > W 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())

a = a_v[0]
b = b_w[0]

pd = b - a
td = a_v[1] - b_w[1]
end = td * t
if end >= pd:
    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()
t= (B-A)%(V-W)
if t == 0 and 0 < (abs(B-A))//(V-W) <= 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, mod = divmod((A - B) ,(W - V))
if mod != 0:
    print('NO')
    exit()
if 1 <= t <= T:
    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())
V - W > 0

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

if v == w:
  print("NO")
  
elif (v < w):
  ans = (a - b) / (v - w)
  if t <= abs(ans):
    print(ans)
    print("YES")
  else:
    print("NO")
else:
  ans = (b - a) / (v - w)
  if t >= ans:
    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]
p = b[0]-b[1]
if e == 0 or e <= 0:
  print("NO")
else:
  aa = a[0]+a[1]*c
  bb = b[0]+b[1]*c
  g = a[0]*e
  h = g-b[0]
  if p % e == 0:
    if aa >= bb:
      print("YES")
    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())
 
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:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
T = 0
while T <= t:
    a += v
    b += w
    T += 1
    if a == b:
        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())
dis = abs(a - b)
if v <= w:
    print('No')
    exit()
A = set(v * t for t in range(1, T + 1))
B = set(w * t + dis for t in range(1, T + 1))
if len(A.intersection(B)) != 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: 
    Ap = A + V*T
    Bp = B + W*T

    if Ap >= Bp:
        print('YES')
    else:
        print('NO')    
else:
    if W - V <= 0:
        print('NO')
    elif (A-B)//(W-V) <= T:
        print('YES')
    else:
        print('NO')