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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 21:30:21 2020

@author: NEC-PCuser
"""


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


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

if dis == 0:
    print("YES")
elif soutai_v <= 0:
    print("NO")
else:
    amari = dis % soutai_v
    shou = dis // soutai_v

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

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 13~06~2020
"""

import sys
from bisect import *
from math import floor, sqrt, ceil, factorial as F, gcd, pi
from itertools import chain, combinations, permutations, accumulate
from collections import Counter, defaultdict, OrderedDict, deque

INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize) - 1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a, b: (a * b) // gcd(a, b)
setbit = lambda x: bin(x)[2:].count("1")
INT = lambda type: type(sys.stdin.readline()) if type in [int, float] else type(sys.stdin.readline()).replace("\n", "")
ARRAY = lambda type: list(map(type, sys.stdin.readline().split()))
NUMS = lambda type: map(type, sys.stdin.readline().split())


def solve():
    a,v = NUMS(int)
    b,w = NUMS(int)
    t = INT(int)
    if v == w:
        print("YES" if a == b else "NO")
    else:
        if 1 <= (a-b)/(w-v) < t:
            print("YES")
        else:
            print("NO")





if __name__ == "__main__":
    solve()



"""a+v*t = b+w*t
a - b = t*(w-v)"""

Submission status: Wrong Answer

Solution code:
def solve():
	posA, speedA = map(int, input().split())
	posB, speedB = map(int, input().split())
	T = int(input())
	low, high = 1, T
	while low <= high:
		mid = low + (high - low) // 2
		if posA + speedA * mid >= posB + speedB * mid:
			return "YES"
		elif posA + speedA * mid < posB + speedB * mid:
			low = mid + 1
		# else:
		# 	high = mid - 1
	return "NO"




def main():
	print(solve())


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())
'''import sys
x = 0
while x<t:
    if a == b:
        print('YES')
        sys.exit()
    else:
        a = a+v
        b = b+w
        x = x+1
print('NO')'''
if v-w != 0 and w-v != 0:
    if (a-b)/(w-v) <= t and (a-b)/(w-v) >= 1:
        print('YES')
    elif (b-a)/(v-w) <= t and (b-a)/(v-w) >= 1:
        print('YES')
    else:
        print('NO')
else:
    print('NO')
'''    if not b-a > 0 and w-v > 0:
        if (a-b)/(v-w) > t:
            print('NO')
        elif (a-b)/(w-v) < t:
            print('YES')
        else:
            print('YES')
    else:
        print('NO')
else:
    print('NO')'''

Submission status: Wrong Answer

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


def main():
    A, V = map(decimal.Decimal, input().split())
    B, W = map(decimal.Decimal, 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,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
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())
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:
        flag=True
    elif oa==0 and ob==1:
        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:
        flag=True
    elif oa==0 and ob==1:
        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:
def main():
  a, v = map(int,input().split())
  b, w = map(int,input().split())
  t = int(input())
  ans = True
  vect = v - w
  if vect <= 0:
    ans = False
  else:
    if vect * t > abs(a - b):
      ans = True
    else:
      if (a + w * t > 10 ** 9 and b + v * t > 10 ** 9 and b > a):
        ans = True
      elif (a - w * t < -10 ** 9 and b - v * t < 10 ** 9 and b < a):
        ans = True
      else:
        ans = False
  if ans:
    print("YES")
  else:
    print("NO")   
            

main()

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
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())
a, v = M() # おに
b, w = M() # にげる
t = I()
ans = 'NO'
if v-w > 0:
    b_hiku_a = abs(b - a)
    v_hiku_w = v - w
    if b_hiku_a / v_hiku_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 v<=w:
    print("NO")
else:
    if abs(b-a)%(v-w)==0 and abs(b-a)//(v-w)<=t:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

ANS1 = A + V * T 
ANS2 = B + W * T

if ANS1 <= ANS2:
  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())

pos_a = a
pos_b = b
t = 0
while pos_a < pos_b:
    pos_a += v
    pos_b += w
    t += 1
    if T < t:
        print("NO")
        break
    if pos_a == pos_b:
        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 = 0
if v > w and a<b:
    if a+v*t >= b+w*t:
        flag = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
import os
import random
import re
import sys
import collections
import itertools

def solution(a,v,b,w,t):
    if a < b:
        if v <= w:
            return "NO"
        else:
            if (b-a)/(v-w) > t:
                return "NO"
        return "YES"
    elif a > b:
        if w <= v:
            return "NO"
        else:
            if (a-b)/(w-v) > t:
                return "NO"
        return "YES"
    else:
        return "YES"


if __name__=="__main__":
    i1 = list(map(int, input().strip().split()))
    a, v = i1[0],i1[1]
    i2 = list(map(int, input().strip().split()))
    b, w = i2[0],i2[1]
    t = int(input().strip())
    print(solution(a,v, b, w, t))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 21:30:21 2020

@author: NEC-PCuser
"""


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


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

if dis == 0:
    print("YES")
elif soutai_v <= 0:
    print("NO")
else:
    amari = dis % soutai_v
    shou = dis // soutai_v

    if amari == 0 and shou <= 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())

flag = False

for i in range(1, t + 1):
    at = a + v * i
    bt = b + w*i
    if at == b:
        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())
oni = v * t
nige = w * t

if oni + a >= nige + b:
  print("YES")
elif oni + a == nige + b:
   print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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


if V - W == 0:
    print('NO')
    exit()

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

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

if t == t_j and t <= T and 0 < t:
    print('YES')

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

    n = diff_pos // diff_vel
    if n <= T:
        # 時間内に追いつけそう
        while True:
            if A == B:
                print("YES")
                break
            elif T == 0:
                print("NO")
                break
            elif A < B:
                A += V
                B += W
                T -= 1
            else:
                A -= V
                B += W
                T -= 1
    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:
        if a - v*t <= -1*10**9:
            print("YES")
        else:
            print("NO")
    else:
        if w >= v:
            print("NO")
        else:
            print("YES" if abs(v-w)*t >= abs(a-b) else "NO")
else:
    if b + w*t >= 10**9:
        if a + v*t >= 10**9:
            print("YES")
        else:
            print("NO")
    else:
        if w >= v:
            print("NO")
        else:
            print("YES" if abs(v-w)*t >= abs(a-b) else "NO")

Submission status: Wrong Answer

Solution code:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

from decimal import Decimal
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")
else:
    if Decimal((b-a)/(v-w)) == math.floor(Decimal((b-a)/(v-w))) and abs( Decimal((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())

kyo = abs(b - a)
ti = v - w

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


if kyo / ti <= t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
[A,V]=[int(i) for i in input().split()]
[B,W]=[int(i) for i in input().split()]
T=int(input())
if abs(B-A)>T*abs(W-V):print("NO")
else:print("YES")

Submission status: Wrong Answer

Solution code:
num_input = [input() for i in range(3)]
a = int(num_input[0].split()[0])
v = int(num_input[0].split()[1])
b = int(num_input[1].split()[0])
w = int(num_input[1].split()[1])
t = int(num_input[2].split()[0])

if v-w<=0:
    ans="NO"
elif int((b-a)/(v-w))<=t:
    ans="YES"
else:
    ans="NO"
    
print(ans)

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 13~06~2020
"""

import sys
from bisect import *
from math import floor, sqrt, ceil, factorial as F, gcd, pi
from itertools import chain, combinations, permutations, accumulate
from collections import Counter, defaultdict, OrderedDict, deque

INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize) - 1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a, b: (a * b) // gcd(a, b)
setbit = lambda x: bin(x)[2:].count("1")
INT = lambda type: type(sys.stdin.readline()) if type in [int, float] else type(sys.stdin.readline()).replace("\n", "")
ARRAY = lambda type: list(map(type, sys.stdin.readline().split()))
NUMS = lambda type: map(type, sys.stdin.readline().split())


def solve():
    a,v = NUMS(int)
    b,w = NUMS(int)
    t = INT(int)
    if v == w:
        print("YES" if a == b else "NO")
    else:
        if 1 <= (a-b)//(w-v) < t:
            print("YES")
        else:
            print("NO")





if __name__ == "__main__":
    solve()



"""a+v*t = b+w*t
a - b = t*(w-v)"""

Submission status: Wrong Answer

Solution code:
ax, at = map(int, input().split(' '))
bx, bt = map(int, input().split(' '))
t = int(input())

a_l = ax + at*t
b_l = bx + bt*t

if a_l <= b_l:
	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())
flag=0
if v<=w:
    pass
elif a==b:
    flag=1
elif ((b-a)/(v-w))<0:
    pass
elif ((b-a)/(v-w))<=t:
    flag=1
if flag==1:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

flag = 0
if v > w and a<b:
    if a+v*t >= b+w*t:
        flag = 1
elif a == b:
    flag = 1
else:
    if a+v*t <= b+w*t:
        flag = 1

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

Submission status: Wrong Answer

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

if (v == w) and (a < b):
  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 = 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
    d = abs(b[0] - a[0])
else:
    typo = 1
    d = abs(a[0] - b[0])

aa = a[1] * t 
bb = b[1] * t

if typo == 0:
    if bb - aa < 0:
        pass
    else:
        print('NO')
        exit()
else:
    if aa - bb < 0:
        pass
    else:
        print('NO')
        exit()

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
print(d,s)
if a == b:print("YES")
elif (s*t != 0) and d <= (s*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 and b > a) or (v >= w and b < a):
  ans = t + 1
else: 
  ans = (b - a) / (v - w)


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
la = list(map(int, input().split()))
lb = list(map(int, input().split()))
t = int(input())


dis = lb[0] - la[0]
a = la[1]*t
b = lb[1]*t
speed = (b-a)

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

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
  print('NO')
  exit(0)
if abs(a-b)%(v-w) == 0:
  f = abs(a-b//(v-w))
else:
  f = abs(a-b//(v-w)+1)
if f <= t:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

if a < b:
    for i in range(t):
          a_ = a + v * i
          b_ = b + w * i
          if a_ == b_:
              x.append(1)
          else:
              x.append(0)
              

if b < a:
    for i in range(t):
          a_ = a - v * t
          b_ = b - w * t
          if a_ == b_:
              x.append(1)
          else:
              x.append(0)


if 1 in x:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if A < B and (V-W)*T >= B-A and (B-A) % (V-W) == 0:
    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 +s
            t2 = t- l//s

            if l2 % s == 0 and l2 //s <=t2 :
                print("YES")
            else:
                print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if V - W == 0:
    print('NO')
    exit()

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

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

if t == t_j and t <= T:
    print('YES')

print('NO')

Submission status: Wrong Answer

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

if a==b:
    print("YES")
    exit()
elif v==w:
    print("NO")
    exit()
atai = (b-a)%(v-w)
if atai==0 and a+v*t>=b+w*t or atai==0 and a+v*t>=b-w*t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
ax, at = map(int, input().split(' '))
bx, bt = map(int, input().split(' '))
t = int(input())

a_l = ax + at*t
b_l = bx + bt*t

if a_l < b_l:
	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())
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:
        flag=True
    elif oa==0 and ob==1:
        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:
        flag=True
    elif oa==0 and ob==1:
        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 W >= V:
  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())
time=[i for i in range(T+1)]
x=0

for i in time:
    if A==B:
        x=1
        break
    A=A+V
    B=B+W
    
if x==1:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
# coding:utf-8
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:
def tag(a,b,v,w,t):
    it = a+(v*t*2)
    other = b+(w*t*2)
    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 v <= w:
    print("NO")
elif -(-(b-a))//(v-w) > t:
    print("NO") 
else:
    print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

sub_BA = B-A
sub_WV = W-V

if sub_WV == 0:
  print("NO")
elif (sub_BA * sub_WV) < 0 and sub_BA % sub_WV == 0:
  if int(sub_BA / sub_WV) <= 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())

now = a - b
fin = (a + v * t) - (b + w * t)
if now * fin <= 0:
    ans = "YES"
else:
    ans = "NO"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    A, V = map(int, input().strip().split(" "))
    B, W = map(int, input().strip().split(" "))
    T = int(input().strip())

    L = abs(A - B)
    v = V - W

    if L <= v * T:
        if 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:
  f = False
else:
  t = abs(B - A) // (V - W)
  if t <= T:
    f = True
  else:
    f = False

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

Submission status: Wrong Answer

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

flag = 0
if v > w and a<b:
    if a+v*t >= b+w*t:
        flag = 1
elif a == b:
    flag = 1

if flag ==1:
    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:
    if 10**9+a<=t*v:
        print("YES")
        sys.exit()
    zb = b-t*w
    if zb<-(10**9):
        zb=-(10**9)
    if zb<a-v*t:
        print("NO")
        sys.exit()
    else:
        print("YES")
        sys.exit()
if a<b:
    if 10**9-a<=t*v:
        print("YES")
        sys.exit()
    zb=t*w+b
    if zb>=10**9:
        zb=10**9
    if zb>t*v+a:
        print("NO")
        sys.exit()
    else:
        print("YES")
        sys.exit()

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 = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
flg = True
x = abs(b - a)
y = v - w
if y <= 0:
  flg = False
else:
  if x % y == 0 and  x / y <= t:
    flg = True
  else:
    flg = False
print("YES" if flg else "NO")

Submission status: Wrong Answer

Solution code:
num_input = [input() for i in range(3)]
a = int(num_input[0].split()[0])
v = int(num_input[0].split()[1])
b = int(num_input[1].split()[0])
w = int(num_input[1].split()[1])
t = int(num_input[2].split()[0])

if v-w<=0:
    ans="no"
elif int((b-a)/(v-w))<=t:
    ans="yes"
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(1,t+1):
    a += abs(v)
    b += abs(w)
    if a == b:
        print('YES')
        break
if a != b:
    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())
T0 = 0
L = abs(A - B)

if W >= V:
  print('NO')
else:
  while 1:
    if L % (V - W) == 0 and L // (V - W) + T0 <= T:
      print('YES')
      break
    else:
      L = L - L % (V - W)
      T0 = T0 + L // (V - W)
      if T0 > T:
        print('NO')
        break

Submission status: Wrong Answer

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

f = a + (b*e)
g = c + (d*e)
h = f - g

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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