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

pa = a + v * t
pb = b + w * t
if (a < b):
    if pa < pb:
        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 (v <= w):
  ans = t + 1
else: 
  ans = (b - a) / (v - w)


if t >= ans and ans > 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

flag = 0
if v > w and a<=b:
    for i in range(t):
        if a+v*i >= b+w*i:
            flag = 1
            break

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

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

Submission status: Wrong Answer

Solution code:

a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a>b:
    x=a-v+t
    y=b-w*t
else:
    x=a+v*t
    y=b+w*t
    if abs(x)>=abs(y) or abs(x)==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 abs(a-b) < (v-w)*t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans="No"
if v<=w:
    ans="No"
else:
    if a>b:
        (a-b)//(v-w)+1<=t
        ans="Yes"
    else:
        (b-a)//(v-w)+1<=t
        ans="Yes"
print(ans)

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()
if v - w == 0:
  print('NO')
  exit()
if ((b-a) / (v-w)) % 1 == 0 and 1 <= (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" if (B+W*T) - (A+V*T) <= 0 else "NO")
else:
    print("YES" if (A+V*T) - (B+W*T) <= 0 else "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")
    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()


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

if 0 < abs(X) <= T and X == int(X):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:

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

print(a_par)

if a_par[0] + a_par[1] * sec >= b_par[0] + b_par[1] * sec:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
def onigokko(A, V, B, W, T):
    if B >= A :
        if (B + W*T)-(A + V*T) <=0:
            return "Yes"
        else:
            return "No"
    else:
        if (B - W*T)-(A - V*T) >=0:
            return "Yes"
        else:
            return "No"
onigokko(1,2,3,1,3)
onigokko(1,2,3,2,3)

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

Submission status: Wrong Answer

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

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

if b > a:
    if oni > nige:
        print("YES")
    else:
        print("NO")
else:
    if oni < nige:
        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 or l // s > t:
        print("NO")
    else:
        if l %  s == 0:
            print("YES")
        else:
            l2= l%s
            t2 = t- l//s
            s2 = abs(l2-s)
            if l2 % s2 == 0 and l2 //s2 <=t2 :
                print("YES")
            else:
                print("NO")

Submission status: Wrong Answer

Solution code:

import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
# do magic here
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
distA = v*t
distB = w*t

# diff = abs(a-b)

if a < b:
    if a+distA >= b+distB:
        print("YES")
    else:
        print("NO")
else:
    if a-distA >= b-distB:
        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())

result = 'NO'
for i in range(t):
    if a == b:
        result = 'YES'
        break
    else:
        a += v
        b += w

print(result)

Submission status: Wrong Answer

Solution code:
# cook your dish here
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
cc = 0
while t>0:
    a+=v;
    b+=w;
    if(a==b):
        cc =  1
        print("YES")
        break
    t-=1
if(cc==0):
    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())
  ans = True

  a_can_plus = min(a + v * t, 10 ** 9)
  a_can_minus = max(a - v * t, -10 ** 9)
  b_can_plus = min(b + w * t, 10 ** 9)
  b_can_minus = max(b - w * t, -10 ** 9)

  if a > b:
    if b_can_minus < a_can_minus:
      ans = False
    else:
      ans = True  
  elif a < b:
    if a_can_plus < b_can_plus:
      ans = False
    else:
      ans = True
  if ans:
    print("YES")
  else:
    print("NO")            


main()

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
distance = abs(a - b)
distance_t = (v * t) - (w * t)

if distance - distance_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 v < w:
    print('NO')
    exit()

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

Submission status: Wrong Answer

Solution code:
a,u=map(int,input().split())
b,v=map(int,input().split())
t=int(input())
t=t*1.00
if(v!=u):
    ans=(a-b)/(v-u)
    if((float(int(ans))==ans)and((ans<t)and(ans>0.00))):
        print("YES")
    else:
        print("NO")
elif(v==u):
    if(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())

diff = A - B
diff_v = W - V

if diff_v != 0 and 0 <= diff / diff_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())
count = 0
for i in range(1, t+1):
    if a == b:
        count = 1
        break
    elif a < b:
        a += v 
        b += w
        if a == b:
            count = 1
            break
        else:
            pass
    else:
        a -= v
        b -= w
        if a == b:
            count = 1
            break
        else:
            pass

print("Yes" if count == 1 else "No")

Submission status: Wrong Answer

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

a = int(A) + (int(V) * int(T))
b = int(B) + (int(W) * int(T))

if a >= b:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for _ in range(t):
    if a < b:
        if v < w:
            break
        if a+v >= b+w:
            flg = 1
            break
        a = a+v
        b= b+w
    else:
        if v > w:
            break
        if a-v <= b-w:
            flg = 1
            break
        a = a-v
        b=b-w
        
if flg == 0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

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

if A<B 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:
    if x%y==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 t*v+a>=t*w+b:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys

orga = list(map(int, input().split()))
child = list(map(int, input().split()))
time = int(input())

speed = orga[1] - child[1]
dis = abs(orga[0] - child[0])

if speed <= 0:
    print("No")
    sys.exit()

if dis / speed <= time:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from math import ceil
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if a == b:
    print("YES")
elif a > b:
    if b - w*t <= -1*10**9:
        time = ceil((b - (-1*10**9)) / w)
        if (t-time)*v >= ((a - v*(time)) - (-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:
        time = ceil((10**9 - b) / w)
        if (t-time)*v >= ((10**9) - (a + v*(time))):
            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:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

x =["YES" if (A + i*V) == (B + i*W) else "NO" for i in range(T)]
if "YES" in x:
    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:
        if ((B-A) % (V-W)) == 0:
            print("YES")
        else:
            print("NO")

else:
    if W >= V:
        print("NO")
    else:
        if ((A-B) % (W-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 W>=V:
    print('NO')
    exit(0)

if A*B<0:
    if (abs(A)+abs(B))//(V-W)<=T:
        print('YES')
    else:
        print('NO')
else:
    if abs(abs(A)-abs(B))//(V-W)<=T:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
def tag (A, V, B, W, T):
    if B - A >= 0:
        if B - A <= (V - W)*T:
            print ("YES")
        else:
            print ("NO")
    else:
        if A - B <= (V - W)*T:
            print ("YES")
        else:
            print ("NO")

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if w>=v:
  print("NO")
  exit(0)
else:
  d=abs(v-w)
  dist=abs(a-b)
  time=dist//d
  if time<=t:
    if v%2==1 and w%2==0:
      print("NO")
      exit(0)
    if dist%d==0:
    # if (dist%2==0 and d%2==0) or  (dist%2==1 and d%2==1):
      print("YES")
    else:
      print("NO")
  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())

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

Submission status: Wrong Answer

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

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

if 0 <= W - V:     
    if 0 <= A - B and A - B <= T * (W - V):
        print("YES")
    else:
        print("NO")
else:
    if T * (W - V) <= A - B and A - B <= 0:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    if a+v*t >= b+w*t:
        print('YES')
    elif w >= v and b >= a:
        print('NO')


if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
#_input = input
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
 
#ここに書きたいコードを書く
#データ読み込み
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a == b:
	print("YES")
elif v-w <= 0:
	print("NO")
elif (b-a) <= t*(v-w):
	print("YES")
else:
	print("NO")
 
#input = _input

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)and(V>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)and(V<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 a <= b and a + v*t >= b + w*t:
    print("Yes")
elif a > b 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())

if v>w:
  c=(b-a)/(v-w)
  if t>=c:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

sub = abs(b - a)
if sub == 0:
    print("YES")
else:
    ss = v - w
    if ss < 1:
        print("NO")
    else:
        if ss == 1:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif ss > sub:
            print("NO")
        elif sub % ss == 0:
            print("YES")
        else:
            print("NO")

Submission status: Wrong Answer

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

suma = a[0]
sumb = b[0]

if a[0] < b[0]:
    typo = 0
else:
    typo = 1

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

    if suma == sumb:
        print('YES')
        exit()
    elif typo == 0:
        if suma > sumb:
            break
    else:
        if suma < sumb:
            break
        
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(b-a)
s = v-w
if a == b:print("YES")
elif (s*t != 0) and d%s == 0 and d <= (s*t):print("YES")
else:print("NO")

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    it = a+(v*t+1)
    other = b+(w*t)
    if it > other:
        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())

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:
a,b=map(int, input().split())
c,d=map(int, input().split())
e = int(input())
if d-b>=0 :
    print('NO')
elif b-d>0:
    if e*(b-d)>=(c-a):
        print('YES')
    else:
      print('NO')

Submission status: Wrong Answer

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

# 4 dist_from_oni(+)
# -1 ofs_spd(-)
# T = 5
# expect false
# -5 >= 4

# -4
# 1
# T = 5
# expect false
# 5 <= -4

dist_from_oni = child - oni     # -4
ofs_spd = oni_spd - child_spd   # -1
# T = 5
# -5 >= -4
if dist_from_oni >= 0 and ofs_spd >= 0 or dist_from_oni >= 0 and ofs_spd <= 0:
  if ofs_spd * T >= dist_from_oni:
    print('YES')
  else:
    print('NO')
elif dist_from_oni <= 0 and ofs_spd <= 0 or dist_from_oni <= 0 and ofs_spd >= 0:
  if ofs_spd * T <= dist_from_oni:
    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_BA * sub_WV) < 0 and sub_BA % sub_WV == 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:
  # 負の方向に逃げる
  if (B + 10**9) / W <= T:
    # print("left reach")
    # T立つよりも先に端に到達してしまう場合
    Bdist = (B + 10**9)
  else:
    # print("run left")
    Bdist = W * T
else:
  # 正の方向に逃げる
  if (10**9 - B) / W <= T:
    # print("right reach")
    Bdist = (10**9 - B)
  else:
    # print("run right")
    Bdist = W * T

Adist = V * T
if Bdist + abs(A - B) <= Adist:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
m = list(map(int,input().split()))
k = int(input())

if n[0] >= m[0]:
    print("NO")

for x in range(k):
    if n[0] + n[1]*(x+1) >= m[0] + m[1]*(x+1):
        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 v <= w:
    print('NO')
    exit()

if a > b:
    d1 = a + v * t
    d2 = b + w * t
    if d1 < d2:
        print('NO')
        exit()
else:
    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):
  ans = t + 1
else: 
  ans = (b - a) / (v - w)


if t >= ans and ans > 0:
  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()
if v - w <= 0:
  print('NO')
  exit()
if 1 <= (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())
oni = v * t
nige = w * t

if oni + a < nige + 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())
ans = "NO"
if w<v and (b-a)/(v-w)%1==0 and (b-a)/(v-w)<=t:
    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 B - A < 0:
    if V * T >= A - B:
        print("YES")
    else:
        print("NO")
else:
    if (V-W) * T >= B - A:
        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())

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

pa = a + v * t
pb = b + w * t
if (a < b):
    if pa < pb:
        print('NO')
    else:
        print('YES')
else:
    if pb < pa:
        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:
  if abs(A-B)%abs(V-W) == 0 and abs(A-B)//abs(V-W)<=T:
    print("YES")
  else:
    print("NO")
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 int(a) == int(b):
    print("")
else:
    if move_a >= move_b:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

if A < B and V < W or B < A and W < V:
    print("NO")
    sys.exit()

if W == V and A != B:
    print(("NO"))
    sys.exit()

if A > B:
    ans = (B-A)/(V-W)
if A < B:
    ans = (A-B)/(W-V)


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

a_res = a + (v*t)
b_res = b + (w*t)

if a_res > b_res:

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

s = abs(b-a)
y = (v-w)

if y <= 0:
    print('NO')
else:
    m = s % y
    u = s //y
    if m == 0 and u <= t:
            print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v<=w:
    print("No")
    exit()
if (a-b)//(v-w)<=t:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
pos_a, vel_a = map(lambda x: int(x), input().split())
pos_b, vel_b = map(lambda x: int(x), input().split())
t = int(input())
 
# 鬼の方が遅い
if vel_a <= vel_b:
  print('No')
  exit 
  
if abs(pos_a - pos_b) / vel_a - vel_b > t:
  print('No')
  exit
  
print('Yes')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

position_A = a + (v * t)
position_B = b + (w * t)

if a < b:
    if position_B <= position_A:
        print("YES")
    else:
        print("NO")
else:
    if position_B >= position_A:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
def resolve():
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    dis = abs(a-b)
    spe = abs(v-w)
    if (v-w) <= 0:
        print("No")
        return
    time = dis / spe
    if (v-w) > 0 and time <= t:
        print("YES")
    elif(v-w) > 0 and time > t:
        print("NO")
resolve()

Submission status: Wrong Answer

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

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

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

flag=False

for i in range(len(oni)):
    if oni[i]==nige[i]:
        flag=True
        break
    else:
        continue

print('YES' if flag else '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:#v>w
    dif=v-w
    if dif*t>=abs(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:
    r1 = a + v * t
    r2 = b + w * t
    if v > w and r1 >= r2:
        print('YES')
    else:
        print('NO')
else:
    r1 = a - v * t
    r2 = b - v * t
    if v > w and r1 <= r2:
        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())

kyo = abs(b - a)
ti = abs(v -w)
if ti == 0:
    print("NO")
    exit()

if kyo % ti != 0:
    print("NO")
    exit()
    
if w > v:
    print("NO")
    exit()


if kyo / ti <= 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())

tiji = abs(W-V)
kyori = abs(A-B)

migiiku = False
tukamae = False
if B>A:
    migiiku=True

if W>=V and A!=B:
    print('NO')
else:
    for i in range(1,T+1):
        if migiiku:
            A +=V
            B +=W
        else:
            A -= V
            B -= W
        
        if A==B:
            tukamae = True
            break
    
    if tukamae:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

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

length = int(a[0]) - int(b[0])
v = int(a[1]) - int(b[1])

if(a[1] == b[1]):
	print("no")
else:
	times = length / v

	if(times <= int(c)):
		if(times<0):
			print("no")
		else:
			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
for i in range(t):
    if a+v*i >= b+w*i and a<=b:
        flag = 1
        break

if flag ==1:
    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())
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=math.ceil(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 B==A:
  print("YES")
elif W == V:
  print("NO")
elif (B-A)%(V-W) == 0 and B>A and V>W and (B-A)//(V-W) <=T:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
zahyoA, kyoriV = map(int, input().split())
zahyoB, kyoriW = map(int, input().split())
second = int(input())

for i in range(second):
    zahyoA += kyoriV
    zahyoB += kyoriW

    if zahyoA == zahyoB:
        print("YES")
        break
    
    if i == second - 1:
        print("NO")

Submission status: Wrong Answer

Solution code:
a, v = [int(s) for s in input().split(" ")]
b, w = [int(s) for s in input().split(" ")]
t = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys
import random

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

    out = 'NO'
    for t in range(T):
        d_p = A + V * t
        c_p = B + W * t
    
        if c_p == d_p:
            out = 'YES'
            break
        
    print(out)
main()