Problem:


Score : 200 points

Problem Statement

Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second.
The other child is now at coordinate B, and she can travel the distance of W per second.

He can catch her when his coordinate is the same as hers.
Determine whether he can catch her within T seconds (including exactly T seconds later).
We assume that both children move optimally.

Constraints

-10^9 \leq A,B \leq 10^9

1 \leq V,W \leq 10^9

1 \leq  T \leq 10^9

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A V
B W
T

Output

If "it" can catch the other child, print YES; otherwise, print NO.

Sample Input 1

1 2
3 1
3

Sample Output 1

YES

Sample Input 2

1 2
3 2
3

Sample Output 2

NO

Sample Input 3

1 2
3 3
3

Sample Output 3

NO



Sample input:
1 2
3 1
3


Sample output:
YES

Submission status: Wrong Answer

Solution code:
import math
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if w >= v: 
    print('NO')
elif a > 0:
    if math.ceil((b-a)/(v-w)) <= t:
        print('YES')
    else:
        print('NO')
elif a < 0:
    if b < 0:
        if math.ceil(abs(a-b)/(v-w))<=t:
            print('YES')
        else:
            print('NO')
    else:
        if math.ceil((abs(a)+b)/(v-w))<=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())
dis = abs(A-B)
mob = W-V

if B < A:
    print("No")
elif A < B:
    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())

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

Submission status: Wrong Answer

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

a_move = int(T) * int(V) + int(A)
b_move = int(T) * int(W) + int(B)
if a_move >= b_move:
    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)
  # 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:
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 abs(B-A)//(V-W) <= T:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

position_diff = abs(a-b)
pace_diff = v-w

if pace_diff <= 0:
    print('NO')
elif pace_diff > 0:
    if pace_diff * t > position_diff:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
ans = 0
if a == b:
    ans = 1
if v == w:
    pass
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
# B W
# T
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

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

Submission status: Wrong Answer

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

if v<=w:
  print("no")
  exit()

time = abs((a-b)//(v-w))

if time <= t:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

e1=pow(-10, -9)
e2=pow(10, 9)

if (a<e1)or(e2<a)or(b<e1)or(e2<b)or(v<1)or(e2<v)or(w<1)or(e2<w)or(t<1)or(e2<t)or(a==b):
    sys.exit(0)

ab = abs(b-a)/t+w-v

if ab<=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("Yes")
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):
    print("NO")
elif v <= w:
    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())

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("NO")
    exit()

for i in range(1, t):
    a = a + v
    b = 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())
 
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) == 0 and (A-B)//(W-V) <= T:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if 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")

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

# print(str(ArriveTime))
if float(T) >= ArriveTime:
    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()
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()
    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()
    print('NO')
    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()
    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()
    print('NO')
    sys.exit()

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

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

Submission status: Wrong Answer

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

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

elif abs(B-A) % 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())

xmin = -1e9
xmax = 1e9

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

if a < b:
    if a + v*t >= xmax:
        print("YES")
    elif a + v*t < b + w*t:
        print("NO")
    else:
        print("YES")
else:
    if a - v*t <= xmin:
        print("YES")
    elif a - v*t > b - w*t:
        print("NO")
    else:
        print("YES")

Submission status: Wrong Answer

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

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

if oni <= ko:
    print("NO")
    exit()

for i in range(1, t):
    a = a + v
    b = b + w
    if a >= b:
        print("YES")
        exit()

print("NO")

Submission status: Wrong Answer

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

for i in range(1,T+1):
  a=A+X*i
  b=B+Y*i
  if a==b:
    lia.append(a)
    lib.append(b)
if len(lia)==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())

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

Submission status: Wrong Answer

Solution code:
import math

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

x = math.ceil(abs((W - V)/(A - B)))
diff = abs(A + V * x - B + W * x)
flg = 0
if A + V * T >= B + W * T:
    if A + V * x == B + W * x:
        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())
for i in range(1,T+1):
  a = i * V
  b = i * W
  if (A + a) == (B + b):
    print("YES")
    break
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())
#s = 0
for i in range(t) :
    a = a + v
    b = b + w
    #print(s)
    if a == b:
        s = 1
        break
    else:
        s = 0
#print(s)
if s == 1 :
    print("YES")
else :
    print("NO")

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 dist-(oniV-runnerW)*T <= 0:
  print("YES")
else:
  print("NO")

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

Submission status: Wrong Answer

Solution code:
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):
  print("Yes")
elif(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:
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

print(calc(oniend,kid,pase))

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 t2 > 0:
            print("NO")
        else:
            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:
ABVW = [map(int, input().split()) for _ in range(2)]
AB, VW = [list(i) for i in zip(*ABVW)]
T = int(input())
 
if VW[0] == VW[1]:
    print("NO")
else:
    if AB[1] + VW[1]*T - (AB[0] + VW[0]*T) <= 0:
        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 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())

eva=False

pl=abs(B-A)
ve=V-W

print(pl)
print(ve)

if ve>0:
    if pl<=ve*T:
        if pl%ve==0:
            eva=True
if eva:
    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")
elif(A>=B):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

e1=pow(-10, -9)
e2=pow(10, 9)

if (a<e1)or(e2<a)or(b<e1)or(e2<b)or(v<1)or(e2<v)or(w<1)or(e2<w)or(t<1)or(e2<t)or(a==b):
    sys.exit(0)

ab = abs(b-a)+w*t-v*t

if ab<=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 and V<W:
  print('NO')
elif B<A and W<V:
  print('NO')
elif V==W:
  print('NO')
else:
  x = abs(A-B)
  y = abs(V-W)
  if y*T<x:
    print('NO')
  else:
    print('YES')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

A_point = A
B_point = B

direct = A < B

returnCount = 0

for i in range(1,T+1) :
#   print(A_point, B_point)
   if returnCount > 1 :
       print("NO")
       exit()
   if direct : 
      A_point = A_point+(V) 
      B_point = B_point+(W)
      if A_point == B_point:
         print("YES")
         exit()
      if A_point > B_point:
         direct = False
         returnCount += 1 
   else: 
      A_point = A_point-(V) 
      B_point = B_point-(W)
      if A_point == B_point:
         print("YES")
         exit()
      if A_point < B_point:
         direct = True
         returnCount += 1 

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 + V * T < 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:
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)]
if set(oni).intersection(set(nige)):
    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')
    if len([a for a,b in zip(range(A, A+V*T+V, V),range(B, B+W*T+W, W)) if a==b]) == 0:
        return('NO')
    else:
        return('YES')
print(main())

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

Submission status: Wrong Answer

Solution code:
import random

S = str(input())

A = list(S)

N = random.sample(A, k=3)

print(N[0]+N[1]+N[2])

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:
    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 = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if A == B:
  if V < W or 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")

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:
import sys

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

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

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

if D % X == 0 and D / 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 = int(input())

if v == w:
  print("NO")
  
elif (v < w):
  ans = (b - a) / (v - w)
  if t <= 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())

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'
  return 'YES'

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

    distance=abs(A-B)
    speed_d=V-W

    if (distance==0):
        print("YES")
        
    if speed_d<=0:
        print("NO")
    else:
        if ((distance//speed_d)+1)<=T:
            print("YES")
        else:
            print("NO")




if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

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

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

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

x = math.ceil(abs((W - V)/(A - B)))
diff = abs(A + V * x - B + W * x)
flg = 0
if A + V * T >= B + W * T:
    if A + V * T == B + W * T:
        print("YES")
    else:
        print("NO")
else:
    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:
    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=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:
    for i in range(T):
        D=abs(D-S)
        if D==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())
if v <= w and a != b:
    print('NO')
else:
    if 0 <= ((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 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+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())

cnt = 0
for tt in range(1, t + 1):
    res = (w - v) * tt + (b - a)
    if res == 0:
        cnt = 1

if a >= b and w >= v:
    cnt = 0
if cnt == 1:
    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())
if A == B:
  if V < W or V > W:
    print("NO")
  elif V == W:
    print("YES")

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:
n = "NO"
y = "YES"

A, V = map(int, input().split()) #Aは初期座標 Vは1秒あたりの移動距離#
B, W = map(int, input().split()) #Aは初期座標 Wは1秒あたりの移動距離#
T = int(input()) #移動許可秒数#

##################################################
# 答えはT秒後に鬼が逃げ役と同じ座標or追い越せばYES#
# 計算はTLE対策として掛け算を使用                 #
#V,W * T でT秒間の移動距離を算出                  #
# ANS = A,B + V,W * T                            #   
##################################################

X = V * T
Y = W * T

A += X
B += Y

if B > A:
  print(n)
else:
  print(y)

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) and abs(a-b)%abs(v-w)==0:
    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 B*T < A*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()
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()
    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()
    print('YES')
    sys.exit()
else:
    print('NO')

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 >= l / t:
      print("YES")
    else:
      print("NO")

Submission status: Wrong Answer

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

e1=pow(-10, -9)
e2=pow(10, 9)

if (a<e1)or(e2<a)or(b<e1)or(e2<b)or(v<1)or(e2<v)or(w<1)or(e2<w)or(t<1)or(e2<t)or(a==b):
    sys.exit(0)

ab = abs(b-a)+abs(w-v)*t

if ab<=0:
    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())

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

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

Submission status: Wrong Answer

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



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

for j in range(T):
    A = A - V
    B = B - W

    if A == B:
        D.append(1)
        break
    
    

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

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

Submission status: Wrong Answer

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

if w >= v:
    print('No')
else:
    for i in range(1,t):
        a_place += v
        b_place += w
        if a_place == b_place:
            print('Yes')
            break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    distance=abs(A-B)
    speed_d=V-W

    if speed_d<=0:
        print("NO")
    else:
        if ((distance//speed_d)+1)<=T:
            print("YES")
        else:
            print("NO")




if __name__=="__main__":
    main()

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