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:
import math

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

if V<=W:
    print("NO")
else:
    x=(1-(A-B)/(V-W))
    xint=math.floor(1-(A-B)/(V-W))
    A=A+(xint-1)*V
    B=B+(xint-1)*W

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

        print("YES" if ans==1 else "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:
        u,v = (a-b),(w-v)
        if u%v == 0:
            if 1 <= (a-b)/(w-v) <= t:
                print("YES")
            else:
                print("NO")
        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())

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())
ans = ["YES","NO"]

distance = (b-a)-(v-w)*t
if distance <= 0:
    print(ans[0])
elif distance > 0:
    print(ans[1])

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

pos_o = A
pos_n = B

for i in range(T):
    pos_o += V
    pos_n += W
    if pos_o == pos_n:
        print('YES')
        exit()
    if pos_o > pos_n:
        print('NO')
        exit()

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)

# speedの差分と現在の差分で割り切れればOK、割り切れなければダメ
caught = False
if(a_now < b_now and a_speed <= b_speed):
  #print("aのほうが遅いので一生捕まらない")
  caught = False
elif(a_now > b_now and a_speed >= b_speed):
  #print("aのほうが先に行ってるので一生捕まらない")
  caught = False
else:
  diff = abs(a_now - b_now)
  speed = abs(a_speed - b_speed)
  q = diff // speed
  mod = diff % speed
  #print("現在の距離差は{0}. スピード差は{1}".format(diff, speed))
  #print("おいつくのは{0}秒後. 余りは{1}".format(q, mod))
  if(q <= t and mod == 0):
    caught = True
  else:
    caught = False
  
    

if(caught):
  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 :
    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 = 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:
    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 = list(map(int, input().split()))
b, w = list(map(int, input().split()))
t = int(input())

if a == b and v == w:
    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:
def resolve():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    dist = abs(A - B)
    dist_b = dist + W*T
    if B <= A and (B - W*T) < (-10)**9:
        dist_b = abs(A - (-10)**9)

    elif B > A and (B + W*T) > 10**9:
        dist_b = abs(A - 10**9)

    if V*T >= dist_b:
        print("YES")
    else:
        # 境界条件を考える
        #if B + W*T >
        print("NO")




if __name__ == "__main__":
    resolve()

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

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
T = int(input())
loc = abs(a - b)
if v <= w:
    print('No')
    exit()
if loc % v == 0:
    print('Yes')
    exit()
for i in range(T):
    loc += w
    if loc % v == 0:
        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())
 
flag = True
if abs(A + V*T) < abs(B + W*T):
  flag = False
 
 
  
if flag:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

if 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 = input().split()
b = input().split()
c = input()

if(int(b[1])>=int(a[1])):
	print("NO")
else:
	length = int(b[0]) - int(a[0])
	v = int(a[1]) - int(b[1])
	times = length / v
	if(times <= int(c)):
		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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,T+1):
    if A < B and V <= W:
        print("NO")
        break;
    d = (B-A)-((V-W)*i)
    if d <= 0:
        print("YES")
        break;
    elif (B-A)-((V-W)*(T+1)) > 0:
        print("NO")
        break;

Submission status: Wrong Answer

Solution code:
import math
from sys import stdin,stdout
#% 998244353
from heapq import heapify,heappop,heappush
import collections


a,s1=list(map(int,stdin.readline().split()))
b,s2=list(map(int,stdin.readline().split()))
T = int(stdin.readline())
if s1==s2:
    print("NO")
elif s1>s2:
    if a>b:
        print("NO")
    else:
        d=b-a
        if d/(s1-s2)<=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())

# 相対速度、距離
S = abs(V - W)
D = abs(A - B)
if(S == 0):
    print('NO')
    exit(0)

#print(S, D)
if((A - B) * (V - W) >= 0):
    print('NO')
    exit(0)

#print(S, D)
if(int(D / S) > T):
    print('NO')
    exit(0)
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+v*t >= b+w*t and a < b and w < v:
  if (b-a)%(v-w)==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())

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("aaa")
    if A+T*V >= 1000000000 and B+T*W >= 1000000000:
      print("YES")
      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]=[int(i) for i in input().split()]
[b,w]=[int(i) for i in input().split()]
t=int(input())

la=a+v*t
lb=b+w*t

if la>lb:
  if a<b:
      print("YES")
  else:
      print("NO")

  
elif la==lb:
  print("YES")
  
else:
  print("NO")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
A, V = map(int,input().split())
B, W = map(int,input().split())
T    = input()
a    = int(T) * V
b    = int(T) * W
for i in T:
  if (A + a) >= (B + b):
    print("YES")
    break
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
from decimal import Decimal
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()
a=abs(b-a)%abs(v-w)
atai = Decimal(str(a))
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 a == b:
    print("YES")
elif v <= w:
    print("NO")
else:
    now_a = a
    now_b = b
    for i in range(1, t+1):
        if now_a < now_b:
            now_a += v
            now_b += w
        else:
            now_a -= v
            now_b -= w
        if now_a == now_b:
            print("YES")
            exit()
        else:
            pass
    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()

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
    if A >= B:
      print("YES")
      exit()
    
print("NO")

Submission status: Wrong Answer

Solution code:
a=[input() for i in range(3)]

oni=[int(i) for i in a[0].split()]
hito=[int(i) for i in a[1].split()]
t=int(a[2])

kyori=abs(oni[0]-hito[0])
spe=abs(oni[1]-hito[1])

for i in range(t):
    kyori-=spe
    if kyori==0:
        break
        
if kyori==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())
nomi = a-b
denomi = w-v
if denomi != 0:
    rem = nomi % denomi
    if rem == 0:
        tRe = nomi//denomi
        if tRe>t:
            print('NO')
        elif tRe<0:
            print('NO')
        else:
            print('YES')
    else:
        print('NO')
else:
    if a != b:
        print('NO')
    else:
        print('YES')

Submission status: Wrong Answer

Solution code:
import sys
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
cnt = 0
if a>b or w>v:
    print('NO')
    sys.exit()
for tt in range(t):
    res = (w - v) * tt + (b - a)
    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())

if V <= W:
    # 追いつけない
    print("NO")
else:
    diff_pos = abs(A - B)
    diff_vel = V - W

    if V % W == 0:
        n = diff_pos // diff_vel
        if n <= T:
            # 時間内に追いつける
            print("YES")
        else:
            # 時間が足りない
            print("NO")
    else:
        # 歩幅が合わない
        print("NO")

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split(' '))
b, w = map(int, input().split(' '))
t = int(input())
r = 'NO'
if  abs(b - a) <= abs(w * t - v * t):
    r = 'YES'
print(r)

Submission status: Wrong Answer

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

    if a+(v*t) >= b+(w*t):
        for i in range(1,t+1):
            if a+(v*i) == b+(w*i):
                return print('YES')
        return print('NO')
    else:
        return print('NO')


if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
in1 = input().split()
in2 = input().split()
in3 = input()

oni = int(in1[0])
onispeed = int(in1[1])

kid = int(in2[0])
kidspeed = int(in2[1])

time = int(in3)

oniend = 0
kidend = 0
flg = False
for i in range(time):
  oniend = (onispeed * i) + oni
  kidend = (kidspeed * i) + kid
  if oniend == kidend:
    flg = True
    break
  
if flg:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
from math import gcd


def compute_lcm(x, y):
    lcm = (x*y)//gcd(x,y)
    return lcm

A, V = [int(x) for x in input().split()]
B, W = [int(x) for x in input().split()]
T = int(input())
lcm  = compute_lcm(V, W)
AV = A + lcm * V
BW = B + lcm * W
print("YES" if AV == BW else "NO")

Submission status: Wrong Answer

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

res1 = a + v*t
res2 = b + w*t

if res1 >= res2:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

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

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


if ans <= T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
"""
~~ 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:
class A:

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

class B:

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

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

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

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

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

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

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

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

B().solve()

Submission status: Wrong Answer

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

if (-10**9 <= A <= 10**9) and (-10**9 <= B <= 10**9) and (1 <= V <= 10**9) \
and  (1 <= W <= 10**9) and (1 <= T <= 10**9) and (A != B):
    
    while P != T: 
        if A > B:
            A -= V
            B -= W
            P += 1
        
        elif A < B:
            A += V
            B += W
            P += 1
            
        elif A == B:
            print("YES")
            break
    
    if A != B:
        print("NO")

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

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

res = 0

if s > 0:
    tmp = lange / s
    if tmp.is_integer() and tmp <= T:
        res = 1

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
# 文字列の入力
#s = input()
#開業されたN個要素を受け付ける
#input_list = [list(map(int, input().split())) for i in range(N)]

#print()

ans = "NO"
t=0

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



print(ans)

Submission status: Wrong Answer

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

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

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


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

Submission status: Wrong Answer

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

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

if g <= f:
	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())

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


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

if c % x == 0 and c // x <= t and x <= w:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys

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

for t in range(T):
    is_catchable = S_A * T + A >= S_B * T + B
    if is_catchable:
        break

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

Submission status: Wrong Answer

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

a = la[1]*t
b = lb[1]*t

if b-a >= 0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

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

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

if x >= y:
  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'
kyo=abs(a-b)
so=abs(v-w)
if w>v:
    ans='NO'
elif w==v:
    if a==b:
        ans='YES'
    else:
        ans='NO'
elif w<v:
    if kyo>t*so:
        ans='NO'
    else :
        if kyo%so==0:
            ans='YES'
        else:
            ans='NO'
#print(kyo%so)
print(ans)

Submission status: Wrong Answer

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


if A == B:
    print('YES')
    exit()
else:
    if V - W == 0:
        print('NO')
        exit()

t1 = (B - A) / (V - W)
t2 = (A - B) / (W - V)

t1_j = (B - A) // (V - W)
t2_j = (A - B) // (W - V)

if t1 == t1_j and t2 == t2_j:
    if t1_j < 0:
        print('NO')
        exit()
    if t1_j == t2_j and t1_j <= T:
        print('YES')
        exit()

print('NO')

Submission status: Wrong Answer

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

if V <= W:
  f = False
else:
  s = abs(B - A) / (V - W)
  t = abs(B - A) // (V - W)

  if s == t and t <= T:
    f = True
  else:
    f = False

print("YES" if f else "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:
  for i in range (T):
    if (distance == i * shorten):
      print ("YES")
      flag = 1
  
  if(flag==0):
    print("NO")

Submission status: Wrong Answer

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

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

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

dist_from_oni = child - oni     # -4
ofs_spd = oni_spd - child_spd   # -1
# T = 5
# -5 >= -4
if dist_from_oni >= 0 and ofs_spd >= 0:
  if ofs_spd * T >= dist_from_oni:
    print('YES')
  else:
    print('NO')
elif dist_from_oni <= 0 and ofs_spd <= 0:
  if ofs_spd * T <= dist_from_oni:
    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)*t>=(b-a):print("YES")
# else:print("NO")

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

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("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())
AA = A
BB = B
ans = "NO"
for i in range(1,T+1):
  AA = AA + V
  BB = BB + W
  if AA == BB:
    ans = "YES"
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A_position = A
B_position = B

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

    if A_position == B_position:
        print("YES")
        break
    elif A_position > B_position:
        print("NO")
        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 w >= v:
    ans = "NO"
else:
    diff = abs(a - b)
    v_diff = abs(v - w)
    q, r = divmod(diff, v_diff)
    if r == 0:
        if q <= t:
            ans = "YES"
        else:
            ans = "NO"

    else:
        ans = "NO"

print(ans)

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans=0
if w>v:
  ans='NO'
for i in range(t+1):
  if a + v * i == b + w * i:
    ans='YES'
    break
  else:
    ans='NO'
if w>v:
  ans='NO'
print(ans)

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
#from collections import deque,defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,v = readInts()
b,w = readInts()
t = I()
if a == b:
    print('YES')
    exit()
if a > b:
    a,b = b,a
    v,w = w,v
if v <= w:
    print('NO')
    exit()
ab = abs(a - b)
sa = abs(w - v)
if ab % sa != 0:
    print('NO')
    exit()
if ab//sa <= t:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

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

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