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

    if (v-w) > 0 and (b-a) > 0:
        x = (b-a)//(v-w)
    else:
        return 'NO'
        
    if x <= t and x*v + a == x*w + b:
        return 'YES'

    return 'NO'


print(solve())

Submission status: Wrong Answer

Solution code:
[a,v] = list(map(int, input().split()))
[b,w] = list(map(int, input().split()))
t = int(input())
nomi = a-b
denomi = w-v
if denomi != 0:
    rem = nomi % denomi
    if rem == 0:
        tRe = nomi//denomi
        if 0<=tRe<=t:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
def onigokko():
    A,V = map(int, input().split())
    B,W = map(int, input().split())
    T = int(input())
    
    for i in range(T):
        # Aから一番遠い所へ移動
        B += W

        # Aを動かす
        # 一番遠い所へ移動
        A += V

        # もし、A>=Bなら鬼の勝ち
        if A >= B:
            print('YES')
            return
    print('NO')

onigokko()

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

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:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if A > B:
  result = "YES"
else:
  if V - W > 0:
    if B - A - T * (V - W) <= 0:
      result = "YES"
    elif B - A - T * (V - W) > 0:
      result = "NO"
  else:
    result = "NO"
print(result)

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:
point_a, speed_a = map(int, input().split())
point_b, speed_b = map(int, input().split())
time = int(input())

list_a = [point_a]
list_b = [point_b]
for i in range(time):
  list_a.append(list_a[i] + speed_a)
  list_b.append(list_b[i] + speed_b)
  
for i in range(len(list_a)):
  if list_a[i] == list_b[i]:
    print("YES")
    break
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:
    print('YES')
    exit()

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

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

Submission status: Wrong Answer

Solution code:
#import torch
#import torch.nn as nn
#import matplotlib.pyplot as plt
#from decimal import Decimal

#N=int(input())
A,V = map(float,input().split())
B,W = map(float,input().split())
T=int(input())
#A = list(map(int,input().split()))
#S=str(input())

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

if A < B:
    is_catchable = S_A * T + A >= S_B * T + B
else:
    is_catchable = S_A * T + A <= S_B * T + B

if is_catchable:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans=0
for i in range(t+1):
  if a + v * i >= b + w * i:
    ans='YES'
    break
  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())

if (b + w * t) - (a + v * 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())

x = A + V * T
y = B + W * T

z = A - V * T
w = A - W * T

if A < B:
  if x >= y:
    print('YES')
  else:
    print('NO')
else:
  if z <= w:
    print('YES')
  else:
    print('NO')

Submission status: Wrong Answer

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

if A<B and V<=W or A>B and V>=W:
    print("NO")
elif A<B:
    if ((B-A)/(W-V))%1==0.0:
        if int((B-A)/(W-V))<=T:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    if ((A-B)/(V-W))%1==0.0:
        if int((A-B)/(V-W))%1<=T:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")

Submission status: Wrong Answer

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

flg = True if zahyoA < zahyoB else False 
for i in range(second):
    zahyoA += kyoriV
    zahyoB += kyoriW

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

    if flg and zahyoA > zahyoB:
        print("NO")
        break
    elif not flg and zahyoA < zahyoB:
        print("NO")
        break

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=0
if sub!=0 and sub>0:
    wari=math.ceil(kyo//sub)
if wari<=T and wari!=0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

A = int(A)
V = int(V)
B = int(B)
W = int(W)

T = int(input())

distance = B-A
closer = W-V

def solve():
    if closer >= 0:
        print("NO")
        return
    if distance + (closer * T) <= 0:
        print("YES")
        return
    else:
        print("NO")
        return
solve()

Submission status: Wrong Answer

Solution code:
inputA = input()
curA = int(inputA.split()[0])
a = int(inputA.split()[1])
inputB = input()
curB = int(inputB.split()[0])
b = int(inputB.split()[1])
sec = int(input())
As = []
Bs = []
result = "No"
As.append(curA)
Bs.append(curB)
for i in range(sec):
    for A in As:
        if A in Bs:
            result = "YES"
            continue
    if result == 'YES':
        continue
    newA = []
    newB = []
    for A in As:
        newA.append(A + a)
        if A - a > 0:
            newA.append(A - a)
    for B in Bs:
        newB.append(B+ b)
        if B - b > 0:
            newB.append(B - b)
    As = newA
    Bs = newB
print(result)

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
j = list(map(int, input().split()))
t = int(input())
ans = "No"
if i[0] > j[0]: # 鬼が右側にいるとき
  i[1] = i[0] - t * i[1]
  j[1] = j[0] - t * j[1]
  if i[1] <= j[1]:
    ans = "Yes"
elif i[0] < j[0]: # 鬼が左側にいるとき
  i[1] = i[0] + t * i[1]
  j[1] = j[0] + t * j[1]
  if i[1] >= j[1]:
    ans = "Yes"
else:
    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())
'''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 t*v+a>=t*w+b and a<b:
    print('YES')
elif a-t*v>=b-t*w and b<a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

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

if dis%tume == 0 and dis//tume <= t:
  print("YES")
elif dis <= (t-1)+tume:
  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 B<A and B+W*T>A+V*T:
  print("YES")
elif A<B and B+W*T<A+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())

# 追い越した場合が拾えない？
# diff_pos = A-B
# diff_spd = V-W

# if (diff_spd <= 0) :
#     # まっすぐ逃げきれてしまう
#     print("NO")
# elif (diff_pos > diff_spd * (T)) :
#     print("NO")
# else :
#     print("YES")

# Aが鬼
is_dead_end = False
for i in range(1,T+1) :
    if (A + V == B + W or 
        A - V == B + W or
        A + V == B - W or
        A - V == B - W) :
        # どう逃げてもダメ
        is_dead_end = True
        break

    # まだ捕まってないケース
    if (A < B) :
        # 正方向にまっすぐ逃げる
        B = B + W
        A = A + V
    else :
        # 負方向にまっすぐ逃げる
        B = B - W
        A = A - V

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

if a>b or w>v:
    print('NO')
    sys.exit()
for tt in range(1,t):
    res = (w - v) * tt + (b - a)
    if res == 0:
        print('YES')
        sys.exit()

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 a > b:
        print('NO')
    elif (b-a)%(v-w) != 0:
        print('NO')
    elif 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())

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

if distance - diff * 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())

A_ = A + V * T
B_ = B + W * T

if A < B and A_ >= B_:
  print('YES')
elif A > B:
  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()
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())
if a<b:
    new_a = a + v*t
    new_b = b + w*t
    if new_a >= new_b:
        print("Yes")
    else:
        print("No")
elif a > b:
    new_a = a - v*t
    new_b = b - v*t
    if new_a <= new_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 B > A:
    Dis = B - A
    VtoW = V - W
else:
    Dis = A - B
    VtoW = W - V

result = VtoW * T

if Dis <= result:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
v,w=map(int,input().split())
t=int(input())
if b>w:
  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(b-a) < (v-w)*T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import string
import math

a = list(map(int,input().split()))
b = list(map(int,input().split()))
t = int(input())
flg = False

if(b[1] < a[1]):
    for i in range(t):
        if(a[0] > b[0]):
            a[0] -= a[1]
            b[0] -= b[1]
        else:
            a[0] += a[1]
            b[0] += b[1]
            if(a[0]==b[0]):
                flg = True
                break
if(flg):
    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(A-B)>=T*abs(V-W):print("NO")
else:print("YES")

Submission status: Wrong Answer

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

if w >= v:
    print('NO')
else:
    if abs(a-b) // (v-w) <= t and abs(a-b) % (v-w) == 0:
        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:
def Tag():

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

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

    Time = int(input())

    flag = 'NO'

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

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

        if yes == no:
            flag = 'YES'

    print(flag)

if __name__ == '__main__':
    Tag()

Submission status: Wrong Answer

Solution code:
A,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:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
count = 0
if abs(a - b) > v*t:
    pass
else:       
    for i in range(1, t+1):
        if 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 = int(input())

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

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

Submission status: Wrong Answer

Solution code:
#DEMON# 
RD, SD = map(int, input().split())
#CRIMINAL#
RC, SC = map(int, input().split())

T = int(input())

for i in range(T):
  RD += SD
  RC += SC
  
  if RD >= RC:
    break
  
if RD >= RC:
  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:
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())

if A < B:
    if V <= W:
        print("NO")
    else:
        if ((B-A) + W) == V:
            print("YES")
        else:
            print("NO")

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

Submission status: Wrong Answer

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

if V - W > 0 and 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 (v-w)*t >= 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())

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

Submission status: Wrong Answer

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

A = int(A)
V = int(V)
B = int(B)
W = int(W)

T = int(input())

distance = B-A
closer = W-V

def solve():
    if closer >= 0:
        print("No")
        return
    if distance + (closer * T) <= 0:
        print("Yes")
        return
    else:
        print("No")
        return
solve()

Submission status: Wrong Answer

Solution code:
a, v= map(int, input().split())
b, w= map(int, input().split())
t = int(input())
l = b-a
s = v-w
if l>0:
    print('YES' if l<=s*t else 'NO')
else:
    print('YES' if l>=s*t else 'NO')

Submission status: Wrong Answer

Solution code:
oni = list(map(int,input().split()))
child =list(map(int,input().split()))
time = int(input())
oni_kyori = oni[0]+oni[1]*time
child_kyori = child[0]+child[1]*time
if oni_kyori<child_kyori:
    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())
D = abs(A-B)

if (V-W)*T>=D:
  print("YES")
elif 10**9-A<=V*T and A<B:
  print("YES")
elif abs(-10**9-A)<=V*T and A>B:
  print("YES")
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(a - b)
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:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif sub % 2 == 0 and ss % 2 == 0:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif sub % 2 == 1 and ss % 2 == 1:
            if sub / ss <= 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 a == b:
    print('YES')
    exit()

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from decimal import Decimal as d
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if w==v:
    print("NO")
    quit()
x=d((a-b)/(w-v))
if 0<x and x<=t:
    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())

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

distance = abs(A-B)
shorten  = abs(V-W)
flag = 0

if(V <= W):
  print("NO")
elif(distance < shorten):
  print("NO")
else:
    if(distance%shorten == 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())
z=(v*t)+a
y=(w*t)+b
if z-y>=0:
    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
        if w < v:
            if ((b-a)/(w-v))%1 == 0 and t >= ((b-a)/(w-v)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
        if v > w:
            if ((a-b)/(v-w))%1 == 0 and t >= ((a-b)/(v-w)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

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 = b - a
    v_hiku_w = v - w
    if b_hiku_a / v_hiku_w <= t:
        ans = 'YES'
        if b_hiku_a % v_hiku_w != 0:
            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())

if v*t > 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:
  print('NO')
else:
  if abs(a-b)-abs(v-w)*t>0:
    print('NO')
  else:
    if abs(a-b) % abs(v-w) is 0:
      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())

flg = True if zahyoA < zahyoB else False 
for i in range(second):
    zahyoA += kyoriV
    zahyoB += kyoriW

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

    if flg and zahyoB > zahyoA:
        print("NO")
        break
    elif not flg and zahyoA < zahyoB:
        print("NO")
        break

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
 
if A + V * T >= B + W * T:
    if (A + V * T) % 2 == 0 and B + W * T % 2 == 0:
        print("YES")
    elif (A + V * T) % 2 == 1 and B + W * T % 2 == 1:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if v == w :print('NO')
elif 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())
print("YES" if v*t+a==w*t+b else "NO")

Submission status: Wrong Answer

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

if a+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 w==v:
    print("NO")
else:
    tt = (b-a)/(w-v)
    if tt < 0:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
import sys

A, V = [int(x) for x in input().strip().split(" ")]
B, W = [int(x) for x in input().strip().split(" ")]
T = int(input().strip())

if V <= W:
    print("NO")
    sys.exit(0)
df = abs(A - B)
t, df = divmod(df, V - W)
if df == 0:
    if t <= T:
        print("YES")
        sys.exit(0)
    else:
        print("NO")
        sys.exit(0)
T = T - t
df += V - W
t, df = divmod(df, V - W)
if df == 0:
    if t <= T:
        print("YES")
        sys.exit(0)
    else:
        print("NO")
        sys.exit(0)

Submission status: Wrong Answer

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

count = 0
a = A
b = B

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

if A < B:
  if V <= W:
    print("NO")
  else:
    if A+T*V >= 1000000000 and B+T*W >= 1000000000:
      print("YES")
      exit()

    sa = B - A
    diff = V - W
    if sa % diff == 0:
      if sa//diff <= T:
        print("YES")
      else:
        print("NO")
    else:
      print("NO")
else:
  if V >= W:
    print("NO")
  else:
    print("Hello")
    exit()
    sa = A - B
    diff = W - V
    if sa % diff == 0:
      if sa//diff <= 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 b * w - a * v <= t:
    print ("YES")
else:
    print ("No")

Submission status: Wrong Answer

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


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

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,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
a = abs(a)
b = abs(b)
ans = "NO"

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

Submission status: Wrong Answer

Solution code:
from decimal import *
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()
    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())

def solve(A, B, V, W, T):
    if A>B or V<=W:
        return False
    la = A+V*T
    lb = B+W*T
    return la>lb





A, V = rrm()
B, W = rrm()
T = rri()
ans = solve(A, B, V, W, T)
if 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 a+v*t >= b+w+t:
    print('YES')
else:
    print('NO')