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:
  print("YES")
elif V<=W:
  print("NO")
elif (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 + a
nige = w*t +b

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

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

if e>d:
  print("YES")
else :
  print("NO")

Submission status: Wrong Answer

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

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

cnt=0
for tt in range(t):
    a_dist=v*tt+a
    b_dist=w*tt+b
    if a_dist>1000000000000000000 or b_dist>1000000000000000000:
        break
    res=b_dist-a_dist
    if res==0:
        cnt=1
        break

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

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
flag=0
if (v-w)==0:
    if t==0:
        flag=1
elif (a==b):
    flag=1
elif (b-a)<0:
    pass
elif t==0:
    pass
elif abs((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())

print('YES' if ((v - w) * t >= (b - a)) and (((v - w) >= 0 and (b - a) >= 0) or ((v - w) <= 0 and (b - a) <= 0)) else 'NO')

Submission status: Wrong Answer

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

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

T=int(input())

kyori=abs(B-A)
#print(kyori)
idousa=V-W

if idousa>0:
  #if kyori % idousa ==0:
    if T>=(kyori//idousa):
      print("YES")
    else:
      print("NO")
  #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 = 0
for i in range(t):
    if a+v*i >= b+w*i and a<b or 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:
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, W = map(int,input().split())
B, V = map(int,input().split())
T = int(input())
flag = "NO"
a = []
b = []
a.append(A)
b.append(B)
if A == B:
    flag = "YES"

for i in range(1, T+1, 1):
    a.append(A + W*i)
    b.append(B + V*i)
    if a[i] == b[i]:
        flag = "YES"
        break

print(flag)

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

        return print('NO')

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

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

MAX = 10**9
MIN = -(10**9)

if W >= V:
    print("NO")
else:
    velocity = V - W
    distination = abs(A - B)
    time = math.ceil(velocity / distination)
    # print("time: {}".format(time))
    if T >= time:
        print("YES")
    else:
        if A >= B:
            if B - W * T < MIN:
                if (10**9 - A) / V <= T:
                    print("YES")
                else:
                    print("NO")
            else:
                print("NO")
        else:
            if B + W * T > MAX:
                if (10**9 - A) / V <= T:
                    print("YES")
                else:
                    print("NO")
            else:
                print("NO")

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    for i in range(1,t):
        it = a+(v*i)
        other = b+(w*i)
        if it >= other and i<t:
            return "NO"
    it = a+(v*t)
    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())

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 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())
check1=list()
check2=list()
for i in range(1,T+1):
  check1.append(A+V*i)
for j in range(1,T+1):
  check2.append(B+W*j)
for k in range(T):
  if check1[k]==check2[k]:
    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 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 = input()
b_w = input()
t = input()
t_int = float(t)
a_v_list = a_v.split()
a = a_v_list[0]
a_int = float(a)
v = a_v_list[1]
v_int = float(v)
b_w_list = b_w.split()
b = b_w_list[0]
b_int = float(b)
w = b_w_list[1]
w_int = float(w)
d = abs(a_int-b_int)
if v_int > w_int:
  spd = v_int - w_int
  chacet = d / spd
  if chacet < t_int:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Wrong Answer

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

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

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

if 0 <= X <= T and X == int(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())
count = 0
if a == b:
    count = 1
elif a < b:
    for i in range(1, t+1):
        if a + v*i == b + w*i:
            count = 1
            break
        else:
            pass
else:
    for i in range(1, t+1):
        if a - v*i == b - w*i:
            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 = int(input())

if b > a:
    if a < 0:
        if b < 0:
            ab = -b - -a
        else:
            ab = -a + b
    else:
        ab = b - a
else:
    if b < 0:
        if a < 0:
            ab = -a - -b
        else:
            ab = -b + a
    else:
        ab = a - b


vt = v * t
wt = w * t



if vt - wt >= ab:
    print("YES")
else:
    print("NO")

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

input = _input

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(v+w))%1 == 0 and t >= abs(a-b)/(v+w) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

dl = abs(a-b)
dv = w-v
# print(dl,dv)
if dl == 0:
    print('YES')
else:
    if dv < 0:
        dv = abs(dv)
        # print(dl//dv)
        # if (dl+dv-1)//abs(dv) <= t:
        if dl//abs(dv) <= t:
            print('YES')
        else:
            print('NO')
    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)/(V-W)<=T:
            print("YES")
        else:
            print("NO")
    elif (V>W)and(W<=0):
        if 0<=(A-B)/V<=T:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:   #B<A
    if (V<W)and(W<0):
        if 0<=(A-B)/(W-V)<=T:
            print("YES")
        else:
            print("NO")
    elif (V>W)and(W>=0):
        if 0<=(A-B)/V<=T:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

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

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

if (V-W)*T >= B-A and (B-A)%(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())
fl = 0
if(V <= W):
  print("NO")
else:
  for i in range(1,T+1):
    if((B-A)==(V-W)*i):
      fl = 1
      break
  if(fl == 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 ((T*V+A) - (T*W+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())
ans='No'

if w>v:
    ans='No'
elif w==v:
    if a==b:
        ans='Yes'
    else:
        ans='No'
else:
    if abs(a-b)>t*abs(v-w):
        ans='No'
    else :
        if abs(a-b)%abs(v-w)==0:
            ans='Yes'
        else:
            ans='No'

print(ans)

Submission status: Wrong Answer

Solution code:
xit,xv = [int(x) for x in input().split()]
xd,dv = [int(x) for x in input().split()]
t = int(input())
rel = xv - dv
if rel == 0:
    print("NO")
    exit(0)
dist = abs(xit - xd)
if int(dist/rel) <= t and int(dist/rel) > 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


is_catchable = abs(S_A * T + A) >= abs(S_B * T + B)
if is_catchable:
    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())
if a > b:
  a, b = a-v*t, b-w*t
  a = -1 * 10**9 if a < -1 * 10**9 else a
  b = -1 * 10**9 if b < -1 * 10**9 else b
  if a <= b:
    print('YES')
  else:
    print('NO')
else:
  a, b = a+v*t, b+w*t
  a = 10**9 if a > 10**9 else a
  b = 10**9 if b > 10**9 else b
  if a >= b:
    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 (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:
    if v <= w:
        print("NO")
    else:
        dis = abs(b-a)
        sp = abs(v-w)
        #dis = BとAの距離 sp = VとWの速度差 正方向
        if dis % sp != 0:
            print("NO")
        else:
            if 0<= dis // sp <= t:
                print("YES")
            else:
                print("NO")
elif a > b:
    if v <= w:
        print("NO")
    else:
        dis = abs(b-a)
        sp = abs(v-w)
        if dis % sp != 0:
            print("NO")
        else:
            if 0<= dis//sp <= 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 int((b-a)/(v-w)) > t:
    print("NO") 
else:
    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())
  ans = True
  vect = v - w
  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:
    ans = True
  elif a > b:
    if b_can_minus < a_can_minus:
      ans = False
    else:
      ans = True  
  else:
    if b_can_plus <= a_can_plus:
      ans = True
    else:
      ans = False
  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())
x1=(v-w)
y1=(b-a)
    
if(y1!=0 and x1%y1==0 and 0<=x1//y1<=t):
    print('YES')
elif(y1==0 and x1==0):
    print('YES')
else:
    print("NO")

Submission status: Wrong Answer

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

flag = 0
t_now = 0
while t_now<=t:
  if a+t_now*a_v == b+t_now*b_v:
    flag=1
  t_now=t_now+1
    


if flag==0:
  print('No')
else:
  print('Yes');

Submission status: Wrong Answer

Solution code:
import sys
import math
def get_array(): return list(map(int,sys.stdin.readline().strip().split()))
def get_ints(): return map(int,sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a,v=get_ints()
b,w=get_ints()
t=int(input())
flag=0
if a!=b and v==w:
    print("NO")
else:
    c=a+v
    d=b+w
    for i in range(1,t):
        c=c+v 
        d=d+w 
        if c==d:
            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())

if B > A:
    AtoB = B - A
    VtoW = V - W
else:
    AtoB = A - B
    VtoW = W - V

if AtoB <= VtoW * T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

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

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

    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())
First=abs(A-B)
Move=W-V
if First+(Move*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())


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

lange = abs(A - B)
s = V - W

res = 0

if (s > 0):
    for i in range(T):
        if (B - A) == s:
            B -= W
        else:
            B += W
        if (B - A) > 0:
            A += V
        else:
            A -= W

        if (B - A) == 0:
            res = 1
            break


if (res == 0):
    print("NO")
else:
    print("YES")

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

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

Submission status: Wrong Answer

Solution code:
numsA = [int(e) for e in input().split()]
numsB = [int(e) for e in input().split()]
T = int(input())
count=0
for i in range(T):
    result_A=numsA[0]+numsA[1]*(i+1)
    result_B=numsB[0]+numsB[1]*(i+1)

    if result_A==result_B:
        print("YES")
        count=1
        break

if count==0:
    print("NO")

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
v_1 = v
w_1 = w
if b < a:
  v_1 = -v
  w_1 = -w
if b+w_1*t <= a+v_1*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 b > a:
    dif = b - a
    if v <= w:
        print("NO")
        sys.exit()
    nowdif = v - w
    x = dif / nowdif
    if x.is_integer() and x <= t:
        print("YES")
        sys.exit()

elif b < a:
    dif = a - b
    if v >= w:
        print("NO")
        sys.exit()
    nowdif = w - v
    x = dif / nowdif
    if x.is_integer() and x <= t:
        print("YES")
        sys.exit()
else:
    print("YES")
    sys.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 A == B:
  print('YES')
  sys.exit()
elif A > B:
  T = -T

posA = A + V*T
posB = B + W*T

if T <= 0:
  if posA < posB:
    print('YES')
  else:
    print('NO')
else:
  if posA > posB:
    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))<0:
	print('NO')
else:
	print('YES')

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

l = b-a
v_l = v-w
if l <=( v_l * t):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
import sys
x = 0
while x<t:
    if a == b:
        print('YES')
        sys.exit()
    else:
        a = a+v
        b = b+w
        x = x+1
print('NO')

Submission status: Wrong Answer

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

if a > b:
    print('NO')
    exit()

if w >= v:
    print('NO')
    exit()

catchup_speed = v - w
start_dis = b - a

if start_dis <= t*catchup_speed:
    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*t - w*t >abs(a-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 w >= v:
    print("NO")
    sys.exit()

d = abs(b-a)
if (v-w)*t >= d and d%(v-w) == 0:
    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 A<B and (V-W)*T>=B-A:
    print("Yes")
elif A>B and (V-W)*T<=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())
D = abs(A-B)

if 10**9-A<=V*T and A<B:
  print("YES")
elif abs(-10**9-A)<=V*T and A>B:
  print("YES")
elif V-W !=0 and 0<D/(V-W)<=T:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
import numpy as np
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if (a+v*t == 0 or b+v*t == 0):
    print('YES' if a+v*t >= b+w*t else 'NO')
else:
    print('YES' if np.log(a+v*t) >= np.log(b+w*t) else '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))*(v-w)==a-b and (a-b)//(v-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())

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

Submission status: Wrong Answer

Solution code:
a,v = list(map(int, input().split()))
b,w = list(map(int, input().split()))
t = int(input())
get = False
for i in range(t):
    a += v
    b += w
    if a == b:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

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

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

# t秒の間、aとbの移動を繰り返し、座標が同じ場所があればYESで終了、
# 最後まで同じ座標にならなければNO
caught = False
if(a_now < b_now and a_speed <= b_speed):
  caught = False
else:
  for i in range(t):
    # print("aは{0}, bは{1}".format(a_now, b_now))
    if(a_now == b_now):
      caught = True
      break
    elif(a_now > b_now):
      caught = True
      break
    else:
      a_now += a_speed
      b_now += b_speed

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

Submission status: Wrong Answer

Solution code:
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

a,v = LI()
b,w = LI()
T = I()

if(a > b):
    a,b = b,a
    v,w = w,v

if(a == b):
    print('YES')
elif(v >= w):
    print('NO')
else:
    low = 0
    high = T

    while(low <= high):
        mid = (low + high) // 2
        val = b - a + (w-v)*mid
        if(val == 0):
            print('YES')
            break
            
        elif(val > 0):
            low = mid + 1
        else:
            high = mid - 1

    if(val != 0):
        print('NO')

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
oa=0
ob=0
flag=True
if(a<b):
    out=10**9
    a=a+v*t
    b=b+w*t
    if out<a:
        oa=1
        a=out-(a-out)
    if out<b:
        ob=1
        b=out-(b-out)
    if oa==1 and ob==1:
        if(a<=b):
            flag=True
        else:
            flag=False
    elif oa==0 and ob==1:
        if(b<=a):
            flag=True
        else:
            flag=False 
    elif oa==1 and ob==0:
        flag=True
    else:
        if(b<=a):
            flag=True
        else:
            flag=False 
else:
    out=(10**9)*(-1)
    a=a-v*t
    b=b-w*t
    if a<out:
        oa=1
        a=out-(out-a)
    if out<b:
        ob=1
        b=out-(out-b)
    if oa==1 and ob==1:
        if(b<=a):
            flag=True
        else:
            flag=False
    elif oa==0 and ob==1:
        if(a<=b):
            flag=True
        else:
            flag=False 
    elif oa==1 and ob==0:
        flag=True
    else:
        if(a<=b):
            flag=True
        else:
            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())
t = int(input())

if ((b * w) - (a * v)) <= t:
    print ("YES")
else:
    print ("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# vim: set fileencoding=utf-8

# pylint: disable=unused-import, invalid-name, missing-docstring, bad-continuation


"""Module docstring
"""

import functools
import heapq
import itertools
import logging
import math
import os
import random
import string
import sys
from argparse import ArgumentParser
from collections import defaultdict, deque
from copy import deepcopy
from io import BytesIO, IOBase
from typing import Dict, List, Optional, Set, Tuple


def solve(a: int, v: int, b: int, w: int, t: int) -> bool:
    if a > b:
        return max(a - v * t, -pow(10, 9)) <= max(b - w * t, -pow(10, 9))
    return min(a + v * t, pow(10, 9)) >= min(b + w * t, pow(10, 9))


def do_job(stdin, stdout):
    "Do the work"
    LOG.debug("Start working")
    # first line is number of test cases
    A, V = map(int, stdin.readline().split())
    B, W = map(int, stdin.readline().split())
    T = int(stdin.readline().strip())
    # values = []
    # for _ in range(N):
    #     values.append(stdin.readline().split())
    result = solve(A, V, B, W, T)
    print("YES" if result else "NO", file=stdout)


def print_output(testcase: int, result, stdout) -> None:
    "Formats and print result"
    if result is None:
        result = "IMPOSSIBLE"
    print("Case #{}: {}".format(testcase + 1, result), file=stdout)
    # 6 digits float precision {:.6f} (6 is the default value)
    # print("Case #{}: {:f}".format(testcase + 1, result), file=stdout)


BUFSIZE = 8192


class FastIO(IOBase):
    # pylint: disable=super-init-not-called, expression-not-assigned
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    # pylint: disable=super-init-not-called
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def configure_log() -> None:
    "Configure the log output"
    log_formatter = logging.Formatter("L%(lineno)d - " "%(message)s")
    handler = logging.StreamHandler(IOWrapper(sys.stderr))
    handler.setFormatter(log_formatter)
    LOG.addHandler(handler)


LOG = None
# for interactive call: do not add multiple times the handler
if not LOG:
    LOG = logging.getLogger("template")
    configure_log()


def main(argv=None):
    "Program wrapper."
    if argv is None:
        argv = sys.argv[1:]
    parser = ArgumentParser()
    parser.add_argument(
        "-v",
        "--verbose",
        dest="verbose",
        action="store_true",
        default=False,
        help="run as verbose mode",
    )
    args = parser.parse_args(argv)
    if args.verbose:
        LOG.setLevel(logging.DEBUG)
    stdin = IOWrapper(sys.stdin)
    stdout = IOWrapper(sys.stdout)
    do_job(stdin, stdout)
    stdout.flush()
    for h in LOG.handlers:
        h.flush()
    return 0


if __name__ == "__main__":
    sys.exit(main())

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