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

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


print("NO")

Submission status: Wrong Answer

Solution code:
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)
a = (B-A)//(V-W)
if t == 0:
  if B > A:
    if 0 < (B-A)//(V-W) <= T:
      print('YES')
    else:
      print("NO")
  else:
    if 0 < (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())
if A > B:
  result = "YES"
elif A == B:
  result = "YES"
else:
  if V - W > 0:
    for i in range(T + 1, 1, -1):
      if B - A - i * (V - W) == 0:
        result = "YES"
        break
      else:
        result = "NO"
  else:
    result = "NO"
print(result)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python


def run(a, v, b, w, t):
    if a < b:
        for tx in range(t):
            at = a + (v * tx)
            bt = b + (w * tx)
            if at == bt:
                return 'Yes'
        return 'No'
    else:
        for tx in range(t):
            at = a - (v * tx)
            bt = b - (w * tx)
            if at == bt:
                return 'Yes'
        return 'No'


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

    print(run(A, V, B, W, T))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,v=map(float,input().split())

b,w=map(float,input().split())

t=int(input())

total_a=a+v*t
total_b=b+w*t
if a<b:

    if total_a>=total_b:
        print("YES")

    else:
        print("NO")

else:
    if total_b>=total_a:
        print("YES")

    else:
        print("NO")

Submission status: Wrong Answer

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

import sys
dis = abs(a-b)
tume = v-w 
if v <= w:
  print("NO")
  sys.exit()

for i in range(t+1):
  dis -= tume
  if dis == 0:
    print("YES")
    sys.exit()
  elif dis < 0:
    dis = abs(dis)   

print("NO")

Submission status: Wrong Answer

Solution code:
i=(input().split())
j=(input().split())
k=(input())

A=int(i[0])
V=int(i[1])
B=int(j[0])
W=int(j[1])
T=int(k)

print(B)

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

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

d1 = a + v * t
d2 = b + w * t
if d1 < d2:
    print('NO')
    exit()

print('YES')

Submission status: Wrong Answer

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

if v <= w:
  print('NO')
  exit()
elif a >= b:
  print('YES')
  exit()
  
oni = a + (v*t)
child = b + (w*t)

if oni >= child:
  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):
    d1 = (A+V*i)-(B+W*i)
    d2 = (A+V*(i-1))-(B+W*(i-1))
    if d1 == 0:
        print("YES")
        break;
    elif d1 <= d2  :
        print("NO")
        break;

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
flag=0
if v<=w:
    pass
elif a==b:
    flag=1
elif ((b-a)/(v-w))<=t:
    flag=1
if flag==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())
ans="NO"
if v!=w:
  if a<b and v>w:
    for i in range(t+1):
      if a+v*i == b+w*i:
        ans="YES"
        break
      elif a+v*i > b+w*i:
        break
  elif a>b and v<w:
    for i in range(t+1):
      if a+v*i == b+w*i:
        ans="YES"
        break
      elif a+v*i < b+w*i:
        break
print(ans)

Submission status: Wrong Answer

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

if a >= 0:
  a_2 = v * t + a
elif a < 0:
  a_2 = -v * t + a
if b >= 0:
  b_2 = w * t + b
elif b < 0:
  b_2 = -w * t + b

if a >= b and b_2 >= a_2:
  print("YES")
  exit()
elif b >= a and a_2 >= b_2:
  print("YES")   
  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())
for i in range(t):
    a+=v
    b+=w
    if a>=b:
        print('YES')
        break
    else:
        print('NO')
        break

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
x1=(v-w)
y1=(b-a)
if(x1==0):
    f=1
elif(y1==0):
    f=0
elif(x1%y1==0):
    x=x1//y1
    if 0<=x<=t:
        f=1
    else:
        f=0
else:
    f=0
if(f==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())

flag=True
if v<=w:
    flag=False
elif a>b:
    if (a-b)%(v-w)!=0 or (a-v*t<=b-w*t):
        flag=False
elif a<b:
    if (b-a)%(v-w)!=0 or (a+v*t<=b+w*t):
        flag=False

print('YES' if flag else 'NO')

Submission status: Wrong Answer

Solution code:


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

a = A
b = B

T = int(input())
for i in range(T):
    a += V
    b += W
    if a > b:
        break

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

Submission status: Wrong Answer

Solution code:
a=input().split(' ')
b=input().split(' ')
c=int(input())
i=0
d=int(a[0])
e=int(a[1])
f=int(b[0])
g=int(b[1])
while i<c:
    d=d+(e*i)
    f=f+(g*i)
    i=i+1
if f>=d:
    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())
av=a
bw=b
ans='NO'

avt=a+t*v
bwt=b+t*w

if a>b:
    pass
elif avt>=bwt:
    ans='YES'


print(ans)

Submission status: Wrong Answer

Solution code:
a,v = input().split(' ')
b,w = input().split(' ')
T = int(input())
A = int(a)
V = int(v)
B = int(b)
W = int(w)

tagged = 0

for t in range(T+1):
	if(abs(A-B)<abs(V*t-W*t)):
		print("YES")
		tagged = 1
		break
if(tagged == 0):        
	print("NO")

Submission status: Wrong Answer

Solution code:
import decimal

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

if (a+v*t)>=(b+w*t) 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 (a*b) >= 1:
    child = abs(b-a)
else:
    child = abs(a+b)

try:
    n = child/(v-w)
except ZeroDivisionError:
    n = -1
if n>=0 and n <= t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

move_a = int(v) * int(t) + int(a)
move_b = int(w) * int(t) + int(b)

if move_a > move_b:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

if v>w and b>a:
    if (b-a)/(v-w) <= t:
        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())

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

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

Submission status: Wrong Answer

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

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

for i in range(1,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+(v*(t-1)))/100 >= (b+(w*(t-1)))/100:
    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:
    kyo=B-A
if A>B:
    kyo=A=B

sub=V-W
wari=T+10
if sub!=0 and sub>0:
    wari=kyo//sub
if wari<=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 and v<=w:
    print("NO")
elif b<a and w<=v:
    print("NO")
elif b>a and w>=v:
    print("NO")
elif  a>b and v>=w:
    print("NO")
else:
    if abs(b-a)<=t*abs(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())

A_sum = A + V * T
B_sum = B + W * T

if B > A:
    if A_sum >= B_sum:
        print('YES')
    else:
        print('NO')

else:
    if A_sum <= B_sum:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
from decimal import *
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
getcontext().prec=20
if A==B:
    print("YES")
elif A<B:
    if (V>W)and(W>0):
        if 0<=(B-A)<=T*(V-W):
            print("YES")
        else:
            print("NO")
    elif (V>W)and(W<=0):
        if 0<=(A-B)<=T*V:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:   #B<A
    if (V<W)and(W<0):
        if 0<=(A-B)<=T*(W-V):
            print("YES")
        else:
            print("NO")
    elif (V>W)and(W>=0):
        if 0<=(A-B)<=T*(-V):
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

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

if W>=V:
    print('NO')
else:
    if V-W==1 and abs(B-A)<=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())
print("Yes" if (V-W)*T>0 and (V-W)*T > abs(A-B) else "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, W = -V, -W

if abs(V) <= abs(W):
    ans = "NO"
elif (B - A) % (V - W) == 0:
    if (B - A) / (V - W) <= T:
        ans = "YES"
    else:
        ans = "NO"
else:
    ans = "NO"
print(ans)

Submission status: Wrong Answer

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

for i in range(T):
  A += V
  B += W
  if A == B:
    print('YES')
    exit()

print('NO')

Submission status: Wrong Answer

Solution code:
point_a, speed_a = map(int, input().split())
point_b, speed_b = map(int, input().split())
time = int(input())

check = 0
for i in range(time + 1):
  a = point_a + speed_a * i
  b = point_b + speed_b * i
  if a == b:
    print("YES")
    check = 1
    break
    
if check == 0:
  print("NO")

Submission status: Wrong Answer

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
d = abs(a-b)
ss = v+w
ms = abs(w-v)
if not d%ss and d/ss <= t:
  print("YES")
elif ms != 0 and not d%ms and d/ms <= t:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

for t in range(1, T+1):
    if B+W*t == A+V*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())

kyori = abs(A-B)
if A == B:
    print("YES")
    exit()
if V > W :
    if kyori/V-W > T:
        print("NO")
    else:
        print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import math

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

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

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


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

if v % w == 0 and v // w * t >= c and lcm(v, w) <= 2 * 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 (abs(v * t + a) >= abs(w * t + 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 = input()

if (int(A) < int(B) and int(V) < int(W)):
    print("False")

a = int(A) + (int(V) * int(T))
b = int(B) + (int(W) * int(T))
if a >= b:
    print("True")

Submission status: Wrong Answer

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
import math
from decimal import *

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

c = Decimal(b) - Decimal(a)
d = Decimal(v)*Decimal(t) - Decimal(w)*Decimal(t)

if d >= c:
    print("YES")

else :
    print("NO")

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

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

Submission status: Wrong Answer

Solution code:
A,v1=map(int,input().split())
B,v2=map(int,input().split())
t=int(input())
if((B>A and v2>=v1) or (A>B and v1>=v2)):
  print("NO")
else:
  d = abs(A-B)/abs(v2-v1)
  if(d<=t and int(d)==d):
    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())

import sys
dis = abs(a-b)
tume = v-w 
if v <= w:
  print("NO")
  sys.exit()

for i in range(t):
  dis -= tume
  if dis == 0:
    print("YES")
    sys.exit()
  elif dis < 0:
    dis = abs(dis)   

print("NO")

Submission status: Wrong Answer

Solution code:
class A:

    def solve(self):
        name = input()
        print(name[:3])

class B:

    def solve(self):
        [a, v] = [int(x) for x in input().split(" ")]
        [b, w] = [int(x) for x in input().split(" ")]
        t = int(input())

        if a > 0 and b < 0:
            a_end = a - t * v
            b_end = b - t * w

            if a_end <= b_end:
                print("YES")
            else:
                print("NO")
        elif a < 0 and b > 0:
            a_end = a + t * v
            b_end = b + t * w

            if a_end >= b_end:
                print("YES")
            else:
                print("NO")
        elif a < 0 and b < 0:
            if a < b:
                a_end = a + t * v
                b_end = b + t * w

                if a_end >= b_end:
                    print("YES")
                else:
                    print("NO")
            else:
                a_end = a - t * v
                b_end = b - t * v

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

                if a_end >= b_end:
                    print("YES")
                else:
                    print("NO")
            else:
                a_end = a - t * v
                b_end = b - t * v

                if a_end <= b_end:
                    print("YES")
                else:
                    print("NO")

B().solve()

Submission status: Wrong Answer

Solution code:
def Tag():

    Yes_oni = list(map(int,input().split()))

    No_oni = list(map(int,input().split()))

    Time = int(input())

    flag = 'NO'

    for i in range(Time+1):
        yes = Yes_oni[1]*i + Yes_oni[0]

        no = No_oni[1]*i + No_oni[0]

        if yes == no:
            flag = 'YES'

    print(flag)

if __name__ == '__main__':
    Tag()

Submission status: Wrong Answer

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

d = abs(b[0] - a[0])
suma = a[0]
sumb = b[0]

for i in range(t):
    suma = suma + a[1]
    sumb = sumb + b[1]

    if suma == sumb:
        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())

A_position = A
B_position = B

for i in range(T):
    A_position += V
    B_position += W

    if A_position == B_position:
        print("YES")
        break
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
for i in range(T):
    if A + V * i >= B + W * i:
        flag = True
        break

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

Submission status: Wrong Answer

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

if a<b and 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("YES")
elif A+T*V>=B+T*W:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
s=input().split()
a=int(s[0])
v=int(s[1])
s=input().split()
b=int(s[0])
w=int(s[1])
t=int(input())
a+=v*t
b+=w*t
if abs(a-b)<=t*(v-w):
  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()) 

for i in range(1, 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())

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

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

Submission status: Wrong Answer

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

@author: sd18016
"""

import sys

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

kyori = abs(B-A)
if V <= W:
    print("NO")
    sys.exit()
else:
    miji = V - W
    if kyori % miji == 0:
        a = kyori // miji
        if a <= T:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

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

kyori = abs(A-B)
if A == B:
    print("Yes")
    exit()
if V > W :
    if kyori/V-W > T:
        print("NO")
    else:
        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")
else:
    a += (v * t)
    b += (w * t)
    if (a >= b):
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

A_P = A + V * T
B_P = B + W * T

if A_P >= B_P:
  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())
catch = False
if a<b:
    for i in range(t+1):
        if a==b:
            catch=True
            break
        if a>b:
            break
        a += v
        b += w
if a>b:
    for i in range(t+1):
        if a==b:
            catch=True
            break
        if a<b:
            break
        a += v
        b += w
if catch:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c,d=map(int,input().split())
e=int(input())
if a<0 and c<0:
  if a>c:
    print('NO')
  else:
    if  a+b*e>=c+d*e:
      print('YES')
  
    else:
      print('NO')
      
else:
  if  a+b*e>=c+d*e:
    print('YES')
  
  else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
v,w=map(int,input().split())
t=int(input())
if 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())
ans="No"
if v<=w:
    ans="No"
else:
    for i in range(1,t+1):
        if a<b:
            a=a+v
            b=b+w
            if a==b:
                ans="Yes"
        else:
            a=a-v
            b=b-v
            if a==b:
                ans="Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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


a_point = a
b_point = b

result = False
for i in range(t):
    a_point += v
    b_point += w

    # print("a: {}, b:{}".format(a_point, b_point))
    if a_point == b_point:
        result = True
        break

if result:
    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

if v <= w:
    print('No')
else:
    for i in range(t+1):
        a += v
        b += w
        if a == b:
            print('YES')
            flag = True
            break
    if flag is False:
        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")
    exit(0)
elif a < b and v <= w:
    print("NO")
    exit(0)


if b > a:
    if (b-a) % (v-w) == 0:
        if (b-a) // (v-w) <= t:
            print("YES")
            exit(0)
        else:
            print("NO")
            exit(0)
    else:
        print("NO")
        exit(0)
else:
    if (a-b) % (w-v) == 0:
        if (a-b) // (w-v) <= t:
            print("YES")
            exit(0)
        else:
            print("NO")
            exit(0)
    else:
        print("NO")
        exit(0)

Submission status: Wrong Answer

Solution code:
import sys
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
for i in range(T):
  if B - A == 0:
    print('YES')
    sys.exit()
  elif B - A > 0:
    A += V
    B += W
  else:
    A -= V
    B -= W
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))//100 >= b+(w*(t-1))//100:
    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())
oni = V*T+A
nige = W*T+B
if oni>=nige:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

if A<B and V<=W or A>B and V>=W:
    print("NO")
else:
    if (abs(A-B)/abs(V-W))%1==0.0:
        if int(abs(A-B)/abs(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())
for i in range(t):
    if a+(v*i)>=b+(w*i):
        print('YES')
        break
    else:
        print('NO')
        break

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

Submission status: Wrong Answer

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

if T >= 1000000000:
  print('YES')

Submission status: Wrong Answer

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

    if A < B :
        pos_b = min(B + W*T, 10**9)
        pos_a = A + V*T
        if pos_b >= 0 and pos_a <= 0:
           print("YES")
           return

        if pos_b >=0 and pos_a >= 0:
            if pos_a >= pos_b:
                print("YES")
            else:
                print("NO")
            return

        if pos_b <= 0 and pos_a >= 0:
            print("NO")
            return

        if pos_b <= 0 and pos_a <= 0:
            if pos_a >= pos_b:
                print("YES")
            else:
                print("NO")
            return

    else:
        pos_b = max(B - W*T, (-10)**9)
        pos_a = A - V*T
        if pos_a <= pos_b:
            print("YES")
        else:
            print("NO")

        if pos_b >= 0 and pos_a <= 0:
           print("YES")
           return

        if pos_b >=0 and pos_a >= 0:
            if pos_a <= pos_b:
                print("YES")
            else:
                print("NO")
            return

        if pos_b <= 0 and pos_a >= 0:
            print("NO")
            return

        if pos_b <= 0 and pos_a <= 0:
            if pos_a <= pos_b:
                print("YES")
            else:
                print("NO")
            return



if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
c = 1
if a > b:
    c = -1
if c*(b - a) <= c*abs(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 v <= w:
    print('NO')
else:
    if abs(a - b) % (v - w) == 0 and abs(a - b) / (v - w) <= t and 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")
else:
    diff_pos = abs(A - B)
    diff_vel = V - W

    if diff_pos % diff_vel == 0 and V % W == 0:
        n = diff_pos // diff_vel
        if n <= T:
            # 時間内に追いつける
            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())

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

if distance < t*sa:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

A=a[0]+a[1]*t
B=b[0]+b[1]*t

if(A>=B): 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())

    a += 10**9
    b += 10**9
    if v == w:
        print('NO')
        return 0
    if b-a > 0 and w-v > 0:
        print('NO')
        return 0
    if (b-a)/(v-w) <= 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 v <= w:
  print('NO')
  exit()
  
oni = a + (v*t)
child = b + (w*t)

if oni >= child:
  print('YES')
else:
  print('NO')