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:
l1 = list(map(int, input().split(" ")))
oni_start = l1[0]
oni_v = l1[1]
l2 = list(map(int, input().split(" ")))
nige_start = l2[0]
nige_v = l2[1]
t = int(input())
if oni_v != nige_v:
    if nige_start>oni_start:
        a = nige_start-oni_start
        if (oni_v>nige_v and a/(oni_v-nige_v)<=t) or 10**9-oni_start<=t*oni_v:
            print("YES")
        else:
            print("NO")
    else:
        a = nige_start-oni_start
        if (oni_v>nige_v and a/(oni_v-nige_v)<=t) or -(-10**9-oni_start)<=t*oni_v:
            print("YES")
        else:
            print("NO")
else:
    if nige_start>oni_start:
        if (10**9-float(oni_start))/oni_v<=float(t):
            print("YES")
        else:
            print("NO")
    elif nige_start<oni_start:
        if (10**9+float(oni_start))/oni_v<=float(t):
            print("YES")
        else:
            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()

elif A < B and after_a > after_b:
    for i in range(T):
        A1 = A + V * i
        B1 = B + W * i
    if A1 == B1:
        print('YES')
        sys.exit()
    print('NO')
    sys.exit()


elif A > B and after_a < after_b:
    for i in range(T):
        A1 = A + V * i
        B1 = B + W * i
    if A1 == B1:
        print('YES')
        sys.exit()
    print('NO')
    sys.exit()
else:
    print('NO')
    sys.exit()

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
b = input().split(" ")
c = int(input())
l = int(a[0])
r = int(a[1])
k = int(b[0])
s = int(b[1])
if (((r * c) + l) >= ((s * c) + k)) or (l == 0 and k == 0) :
    print("YES")
else:
    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 abs(a-b)%abs(w-v) == 0:
            if 1 <= (a-b)/(w-v) <= t:
                print("YES")
            else:
                print("NO")
        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 >=0 and b>=0 :
    if a+v*t >= b+ w*t:
        print("YES")
    else:
        print("NO")
elif 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 = map(int,input().split())
B,W = map(int,input().split())
T   = int(input())
import math

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

if V <= W:
    print("No")
elif (abs(A-B)/abs(V-W)) <= T:
    if not ((T*(V-W))/lcm(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:
    a,b = b,a
    v,w = w,v
if v<=w:
    print('NO')
elif (v-w)/(b-a)<=t:# and (v-w)/(b-a)==(v-w)//(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())
ans = "NO"
if w<v and (b-a)/(v-w)%1==0 and (b-a)/(v-w)<=t and (b-a)/(v-w)>0:
    ans = "YES"
elif w>v and (b-a)/(v-w)%1==0 and (b-a)/(v-w)<=t and (b-a)/(v-w)>0:
    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())

if w < v:
    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())

x = a[1]-b[1]
d = a[0]-b[0]
dd = d/2

if c >= dd >= 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())

# ok = False
# for i in range(T+1):
#     if A + (V*T) == B + (W*T):
#         ok = True
#         break

# if ok:
#     print("YES")
# else:
#     print("NO")
if V-W == 0:
    print("NO")
    import sys
    sys.exit()
    
t = -(A-B)/(V-W)
if float.is_integer(t):
    if 1 <= t and t <= 10e9:
        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 a<b:
    new_a = a + v*t
    new_b = b + w*t
    if new_a >= new_b:
        print("YES")
    elif new_a < new_b:
        print("NO")
elif a > b:
    new_a = a - v*t
    new_b = b - v*t
    if new_a <= new_b:
        print("YES")
    elif new_a > new_b: 
        print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
[a, v] = map(int, input().split(' '))
[b, w] = map(int, input().split(' '))
t = int(input())
b0 = b - a
if (abs(b0) + t * w) < t * v:
  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 = 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): #鬼の方が早い→途中で追いつくor端まで逃げ切る
        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:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
flag=False
for i in range(T):
    if (V*(i+1)+A==W*(i+1)+B):
        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;

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 % 2 == 0) and (W % 2 == 0):
    if abs(A - B) % 2 == 1:
        print("NO")
        exit()

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

if A >= B:
    A_after_T = A-V*T
    B_after_T = 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())

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

if W >= V:
  print("NO")
  exit()
  
if A > B:
  V *= -1
  W *= -1
    
  for t in range(T):
    A += V
    B += W
    if A == B:
      print("YES")
      exit()
    elif A < B:
      print("NO")
      exit()
  
else:
  for t in range(T):
    A += V
    B += W
    if A == B:
      print("YES")
      exit()
    elif A > B:
      print("NO")
      exit()
    
print("NO")

Submission status: Wrong Answer

Solution code:
a_now, a_speed = map(int, input().split(' '))
b_now, b_speed = map(int, input().split(' '))
t = int(input())

# print(a_now, a_speed, b_now, b_speed, t)

# speedの差分と現在の差分で割り切れればOK、割り切れなければダメ
caught = False
if(a_now < b_now and a_speed <= b_speed):
  #print("aのほうが遅いので一生捕まらない")
  caught = False
elif(a_now > b_now and a_speed >= b_speed):
  #print("aのほうが先に行ってるので一生捕まらない")
  caught = False
else:
  #diff = abs(a_now - b_now)
  if(a_now >= b_now):
    diff = a_now - b_now
  else:
    diff = b_now - a_now
  speed = abs(a_speed - b_speed)
  q = diff // speed
  mod = diff % speed
  #print("現在の距離差は{0}. スピード差は{1}".format(diff, speed))
  #print("おいつくのは{0}秒後. 余りは{1}".format(q, mod))
  if(q <= t and mod == 0):
    caught = True
  else:
    caught = False
  
    
if(caught):
  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:
    c=(b-a)/(v-w)
    if t>=c:
      print('YES')
    else:
      print('NO')
  else:
    print('NO')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())

x = a[1]-b[1]
d = a[0]-b[0]
dd = d/2

print(dd)
if c >= dd >= 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
from sys import stdin
A,V = [int(x) for x in stdin.readline().rstrip().split()]
B,W = [int(x) for x in stdin.readline().rstrip().split()]
T = int(stdin.readline().rstrip())

X = W - V
    
if X == 0:
    print("NO")
    
elif abs(A-B) % W != 0:
    print("NO")

elif A >= B and W >= V:
    X = W - V
    C = abs(A - B)

    if C % X == 0:
        if X*T >= C:
            print("YES")
        else:
            print("NO")
                
    else:
        print("NO")
        
elif B >= A and V >= W:
    X = V-W
    C = abs(B-A)
    if C % X == 0:
        if X*T >= C:
            print("YES")
        else:
            print("NO")
                
    else:
        print("NO")

else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys

A, V = [int(x) for x in input().strip().split(" ")]
B, W = [int(x) for x in input().strip().split(" ")]
T = int(input().strip())

if V <= W:
    print("NO")
    sys.exit(0)
df = abs(A - B)
print(df, V - W, T)
t, df = divmod(df, V - W)
if df == 0:
    if t <= T:
        print("YES")
        sys.exit(0)
    else:
        print("NO")
        sys.exit(0)
elif t >= T:
    print("NO")
    sys.exit(0)
T = T - t
print(df, V - W, T)
df += V - W
t, df = divmod(df, V - W)
if df == 0:
    if t <= T:
        print("YES")
        sys.exit(0)
    else:
        print("NO")
        sys.exit(0)
print("NO")
sys.exit(0)

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 b - w*t <= -1*(10**9):
        if a - v*t <= -1*(10**9):
            print("YES")
        else:
            print("NO")
    else:
        if w >= v:
            print("NO")
        else:
            print("YES" if abs(v-w)*t >= abs(a-b) else "NO")
else:
    if b + w*t >= 10**9:
        if a + v*t >= 10**9:
            print("YES")
        else:
            print("NO")
    else:
        if w >= v:
            print("NO")
        else:
            print("YES" if abs(v-w)*t >= abs(a-b) else "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):
    a,b = b,a
    w,v = v,w
diff = b - a
diff2 = w - v

if(a == b):
    print('YES')
else:
    if(diff2 >= 0):
        print('NO')
    else:
        if(diff % 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())

dis = abs(A-B)
mob = W-V

if A == B:
    print("Yes")
else:
    if mob >= 0:
        print("No")
    else:
        if dis % mob != 0:
            print("No")
        else:
            if dis + (mob*(T+1)) <= 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())

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())
ans = "Yes"
if(V<=W):
  ans = "No"
elif(abs(A-B)>T*abs(V-W)):
  ans = "No"
print(ans)

Submission status: Wrong Answer

Solution code:

a_par = list(map(int, input().rsplit())) 
b_par = list(map(int, input().rsplit()))
sec = int(input())

num = 0

for i in range(sec):
    if a_par[0] + a_par[1] * i == b_par[0] + b_par[1] * i:
        num += 1

if num > 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
k = int(input())
x = a + v * k
y = b + w * k
if a == b:
    print('YES')
elif (a < b and v < w) or a < b:
    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())
b0 = b - a
if (b0 + t * w) < t * v:
  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:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if (b-a)*((b+t*w)-(a+t*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')
  exit(0)
if abs((a-b)%(v-w)) == 0:
  f = abs((a-b)/(v-w))
else:
  f = abs((a-b)/(v-w)+1)
if f <= t:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if abs(A-B) < V*T-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())

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

Submission status: Wrong Answer

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



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

if b < a:
    if oni <= ko:
        print("YES")
        exit()
    else:
        print("NO")
        exit()


if oni >= ko:
    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)
v = V-W

if v > 0:
  if dis/v <= T:
  	print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, v = rm()
b, w = rm()
t = ri()
a1 = a + v*t
b1 = b + w*t
if a <= b <= b1 <= a1:
  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 = 0
gap = abs(A-B)
relativeV = abs(V - W)
if  W >= V or relativeV * T < gap:
    flag = 0
elif gap % relativeV == 0:
    flag = 1

if flag == 0:
    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 a == b:
    print('No')
    exit()

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

Submission status: Wrong Answer

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
'''import sys
x = 0
while x<t:
    if a == b:
        print('YES')
        sys.exit()
    else:
        a = a+v
        b = b+w
        x = x+1
print('NO')'''
if v-w != 0 and w-v != 0:
    if a-b > 0:
        if (a-b)/(w-v) <= t and (a-b)/(w-v) >= 1:
            print('YES')
        else:
            print('NO')
    elif b-a > 0:
        if (b-a)/(v-w) <= t and (b-a)/(v-w) >= 1:
            print('YES')
        else:
            print('NO')
else:
    print('NO')
'''    if not b-a > 0 and w-v > 0:
        if (a-b)/(v-w) > t:
            print('NO')
        elif (a-b)/(w-v) < t:
            print('YES')
        else:
            print('YES')
    else:
        print('NO')
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 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 ((xint-1),T+1):
            if A<B:
                A=A+V
                B=B+W
            else:
                A=A-V
                B=B-W
            if A==B:
                ans=1
                break

        print("YES" if ans==1 else "NO")

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
#from collections import deque,defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,v = readInts()
b,w = readInts()
t = I()
ab = abs(a-b)
sa = abs(w - v)
if sa == 0:
    print('NO')
    exit()
if ab % sa != 0:
    print('NO')
elif a < b and v <= w:
    print('NO')
elif a > b and v >= w:
    print('YES')
elif ab/sa <= 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:
    c = 10**20

if v > w and v != w:
    if a == b:
        c = 10**20
    c = abs(a-b)/(v-w)
    
if int(c) <= 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:
    print("NO")
    exit()

if a<0 and b>0:
    a = 0
    b = b+abs(a)
elif b<0 and a>=0:
    a = 0
    b = b-abs(a)


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

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

Submission status: Wrong Answer

Solution code:
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 or A == B:
    print('YES')
    sys.exit()

elif A < B and after_a > after_b:
    for i in range(T):
        A1 = A + V * i
        B1 = B + W * i
    if A1 == B1:
        print('YES')
        sys.exit()
    print('NO')
    sys.exit()


elif A > B and after_a < after_b:
    for i in range(T):
        A1 = A + V * i
        B1 = B + W * i
    if A1 == B1:
        print('YES')
        sys.exit()
    print('NO')
    sys.exit()
else:
    print('NO')
    sys.exit()

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=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:
    print("YES")
    k=1
    break
if k==0:
  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+1):
  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 A == B:
  print("YES")
  exit()

if W >= V:
  print("NO")
  exit()
  
if A > B:
  V *= -1
  W *= -1
    
  for t in range(T):
    A += V
    B += W
    if A == B:
      print("YES")
      exit()
  
else:
  for t in range(T):
    A += V
    B += W
    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())
ans = ["YES","NO"]

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

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())
if a >=0 and b>=0 :
    if a+v*t >= b+ w*t:
        print("YES")
    else:
        print("NO")
elif a < 0 and b >= 0 :
    if -a+v*t >= b + w*t:
        print("YES")
    else :
        print("NO")
else :
    if v*t - w*t >= -a+b:
        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):
    a,b = b,a
    w,v = v,w
diff = b - a
diff2 = w - v

if(a == b):
    print('YES')
else:
    if(diff2 >= 0):
        print('NO')
    else:
        if(diff % diff2 != 0):
            print('NO')
        else:
            if(diff // abs(diff2) <= T):
                print('YES')

Submission status: Wrong Answer

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

for i in range(T):
    A = A + V
    B = B + W
    
    if A == B:
        D.append(1)

#print(D)

if len(D) >= 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())

dis = abs(A-B)
mob = W-V

if A == B:
    print("Yes")
else:
    if mob >= 0:
        print("No")
    else:
        if dis % mob != 0:
            print("No")
        else:
            if dis + (mob*T) <= 0:
                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 a <= b:
    if oni >= nige:
        for i in range(t):
            oni = oni - v * t
            nige = nige - w * t
            if oni == nige:
                print('YES')
            elif oni <= nige:
                print('NO')
                sys.exit()
    else:
        print('NO')
else:
    if oni <= nige:
        for i in range(t):
            oni = oni - v * t
            nige = nige - w * t
            if oni == nige:
                print('YES')
            elif oni >= nige:
                print('NO')
                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 abs(a+v*t) >= abs(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:
    new_a = a + v*t
    new_b = b + w*t
    if new_b > 10**9:
        new_b = 10**9
    if new_a > 10**9:
        new_a = 10**9
    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_b < -10**9:
        new_b = 10**9
    if new_a < -10**9:
        new_a = 10**9
    if new_a <= new_b:
        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

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:
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
            dict ={}

            for i in range(t2):
                l2= abs(l2-s)
                if l2 ==0:
                    flag=True
                    break
                if l2 in dict:
                    break
                else:
                    dict[l2]=l2

            if flag :
                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 and abs(A-B) % (V-W) == 0:
  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 or a>b:
    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 = 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 and dv > 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) < 0:
    a2 = b
    b2 = a
a2 = a
b2 = b
if w-v < 0:
    w2 = v
    v2 = w
w2 = w
v2 = v
if  (v > w) and ((w2-v2)*t > a2-b2):
    print("NO")
elif v > w:
    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 = 0
if v > w and a<b:
    if a+v*t >= b+w*t:
        flag = 1
elif v <  w and a<b:
    if a-v*t <= b-w*t:
        flag = 1
    

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

Submission status: Wrong Answer

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

A1=int(A)+int(V)*T
B1=int(B)+int(W)*T

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

Submission status: Wrong Answer

Solution code:
import math

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

if A<B:
    C=A
    A=B
    B=C

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 ((xint-1),T+1):
            if A<B:
                A=A+V
                B=B+W
            else:
                A=A-V
                B=B-W
            if A==B:
                ans=1
                break

        print("YES" if ans==1 else "NO")