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

ab = b - a
vw = v - w

if vw <= 0:
    print('NO')
else:
    k = ab/vw
    if k <= 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())

eva=False

pl=B-A
ve=V-W

if pl<=ve*T and 0<pl:
    if ve!=0:
        if pl%ve==0:
            eva=True
if eva:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

import sys

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

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

if __name__ == "__main__":
    main()

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

l1 = a + v * t
l2 = b + w * t

flag = False
if a > b and l1 <= l2:
    flag = True
elif a < b and l1 >= l2:
    flag = True
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())

A_position = V*T + A
B_position = W*T + B

if A_position >= B_position:
    print("YES")
else:
    print("NO")

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

for t in range(1, T+1):
    if B+W*T == A+V*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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


is_catchable = (S_A * T + A) >= (S_B * T + B)
if is_catchable:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 13 20:58:10 2020

@author: sd18016
"""

import sys

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

kyori = abs(B-A)
if V <= W:
    print("No")
    sys.exit()
else:
    miji = V - W
    for i in range(T):
        if kyori == miji*i:
            print("Yes")
            sys.exit()
        else:
            if kyori < miji*i:
                print("No")
                sys.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 v == w:
  print("NO")
else:
  if b > a:
    if 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())
for i in range(1,t+1):
    a += v
    b += w
    if a == b:
        print('YES')
        break
if a != b:
    print('NO')

Submission status: Wrong Answer

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

d = B - A
s = (V - W) * T

if (d > 0) & (s >= 0):
  if d <= s:
    print("YES")
  else:
    print("NO")
elif (d < 0) & (s >= 0):
  print("NO")
elif (d > 0) & (s <= 0):
  print("NO")
else:
  if abs(d) <= abs(s):
    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")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
a,va = [int(i) for i in input().split()]
b,vb = [int(i) for i in input().split()]
c = int(input())

print ( "YES" if c*(va-vb)>= b-a 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 A<B and V<W:
  print('NO')
elif B<A and W<V:
  print('NO')
else:
  for i in range(1,T+1):
    A += V
    B += W
    if A==B:
      print('YES')
      break
  else:
    print('NO')

Submission status: Wrong Answer

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

a = abs(B-A)
v = V-W
v2 = v*T

if(A<B and a<=v2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

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

if (W-V) == 0:
    print("NO")
elif (B-A) % (W-V) != 0:
    print("NO")
else:
    if B > A:
        ans = (B-A)//(V-W)
        if 1 <= ans <= T:
            print("YES")
        else:
            print("NO")
    else:
        ans = (A-B)//(W-V)
        if 1 <= ans <= T:
            print("YES")
        else:
            print("NO")

Submission status: Wrong Answer

Solution code:
i=(input().split())
j=(input().split())
k=(input())

A=int(i[0])
V=int(i[1])
B=int(j[0])
W=int(j[1])
T=int(k)

print(B)

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

Submission status: Wrong Answer

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

for x in range(k):
    if n[0] + n[1]*(x+1) >= m[0] + m[1]*(x+1):
        print("YES")
        exit()

print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
A,V = [int(x) for x in stdin.readline().rstrip().split()]
B,W = [int(x) for x in stdin.readline().rstrip().split()]
T = int(stdin.readline().rstrip())

X = W - V
C = abs(A - B)

if C == 0 and X == 0:
    print("YES")
    
elif X == 0:
    print("NO")

    

elif A >= B and W >= V:
    X = W - V
    C = abs(A - B)

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


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

n=b-d
m=c-a

if m<(b*e-d*e):
    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
if A < B:
        if A + T*V >= B + T*W:
            ans = 1
elif B < A:
        if A - T*V <= B + T*W:
            ans = 1
else:
    ans = 1
if ans ==1:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

print('YES' if (a + np.log(v*t)) >= (b + np.log(w*t)) else 'NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
b = [int(j) for j in input().split()]
t = int(input())

dis = abs(a[0]-b[0])

if (b[1]*t+dis) < a[1]*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((V-W)*T>abs(A-B)):
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

if W>=V:
    print('NO')
else:
    if V-W==1 and B-A<=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())

"""for i in range(t):
    if b<a:
        a-=v
        b-=w
    else:
        a+=v
        b+=w
    if a==b:
        print("Yes")
        exit()
print("No")"""

if w>=v:
    print("No")
else:#v>w
    dif=v-w
    if (v-w)*t>=abs(a-b):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

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

res = 0

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

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


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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
a,c=map(int,input().split())
b,d=map(int,input().split())
T=int(input())
if a<b:
  if a+(c*T)>=b+(d*T) and (b-a)%(d-c)==0:
    print("YES")
  else:
    print("NO")
else:
  if a+(c*T)<=b+(d*T) and (a-b)%(c-d)==0:
    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 f >= g:
	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())

d = abs(a-b)
v_diff = abs(v-w)

if d > t * v_diff:
    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())

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

l = a + t * v
r = b + t * w

if l >= r:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, v) = [int(e) for e in lines[0].split(' ')]
    (b, w) = [int(e) for e in lines[1].split(' ')]
    (t, ) = [int(e) for e in lines[2].split(' ')]

    return (a, v, b, w, t)


def solve(a, v, b, w, t):
    

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

    return result    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Wrong Answer

Solution code:
xit,xv = [int(x) for x in input().split()]
xd,dv = [int(x) for x in input().split()]
t = int(input())
if xv - dv < 0:
    print("NO")
else:
    rel = xv - dv
    if rel*t + xit >= xd:
        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 v > w:
    if (b-a)<=t*(v-w):
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if B+W*T<=A+V*T and A<=B or A==B:
    print("YES")
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())

    yes = Yes_oni[1]*Time + Yes_oni[0]

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

    if yes >= no:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    Tag()

Submission status: Wrong Answer

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

count=0
for i in range(T):
    if result_A[i] == result_B[i]:
        print("YES")
        count=1
        break

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

Submission status: Wrong Answer

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

if w<v and b>a:
    if (b-a)/(v-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())
#M=abs(W-V)
#print(M)
M=abs(V*T-W*T)
if(abs(B-A)>M):
  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+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())
x = A
y = B
X = 0
Y = 0
for i in range(T):
    x = x + V
    y = y + W
    if x == y:
        X = 1
        print("YES")
        break
if X == 0:
    print("NO")

Submission status: Wrong Answer

Solution code:
a=input().split(' ')
b=input().split(' ')
c=int(input())
i=0
d=int(a[0])
e=int(a[1])
f=int(b[0])
g=int(b[1])
if i<c:
    d=d+(e*c)
    f=f+(g*c)
if f>d:
    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 = abs(A - B)
v = V - W
if v <= 0:
        print('NO')
else:
    if x % v > 0:
        print('NO')
    elif T < x // v:
        print('NO')
    else:
        print('YES')

Submission status: Wrong Answer

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if A<B and (V-W)*T>B-A:
    print("Yes")
elif A>B and (V-W)*T>A-B:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if V*T+A>W*T+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 b+w*t-(a+v*t)<=0:
    print("YES")
  elif a+v*t>10**9:
    print("YES")
  else:
    print("NO")
else:
  if b-w*t >= a-v*t:
    print("YES")
  elif a-v*t<-10**9:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

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

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

if A < B:
  if x >= y:
    print('YES')
  else:
    print('NO')
else:
  if x > y:
    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())

l1 = a + v * t
l2 = b + w * t

flag = False
if a > b and l1 < l2:
    flag = True
elif a < b and l1 > l2:
    flag = True
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())

    if v == w:
        print('NO')
        return 0
    if b-a > 0 and w-v > 0:
        print('NO')
        return 0
    if 0 <= (b-a)/(w-v) <= 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())

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

Submission status: Wrong Answer

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

d = abs(b - a)
z = v - w

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

for i in range(t):
	d -= z
	if d == 0:
		print('YES')
		exit()

print('YES')

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

flag = False
nowA = A
nowB = B
for i in range(T):
  nowA += V
  nowB += W

  if nowA == nowB:
    flag = True
    break
    
  if nowB >= nowA and W >= V:
    break
  
  if nowA >= nowB and V >= W:
    break

if flag is True:
  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 or A+V*T<B+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())

av = a + (v*t)
bw = b + (w*t)

if av > bw:
  print('YES')
else:
  print('NO')

print(av,bw)

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

Submission status: Wrong Answer

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

print('YES' if (a + np.log(v)) >= (b + np.log(w)) 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())

output = "NO"

for i in range(t):
  if a > b:
    a -= v
    b -= w
  elif a < b:
    a += v
    b += w
  
  if a == b:
    output="YES"
    break

print(output)

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

Submission status: Wrong Answer

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

c = b - a
d = v*t - w*t

if d >= 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())
AB = abs(A - B)
VW = V - W
if VW == 0:
  c = float('inf')
else:
  c = AB / VW
  
if VW <= 0 or AB % VW != 0:
  c = float('inf')

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

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

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

Submission status: Wrong Answer

Solution code:
N,S = map(int,input().split())
n,s = map(int,input().split())
T = int(input())


ans1 = N + S*(T -1)
ans2 = n + s*(T -1)

if ans1 - ans2 < s - S:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

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

if v-w <= 0:
    print("NO")
    exit()

a_z = v*t+a
b_z = w*t+b

if a_z >= b_z:
    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())
get_flag = False
for i in range(1, T+1):
    A += V
    B += W
    if A == B:
        get_flag = True
        break
    elif A >= B:
        break
print("YES" if get_flag else "NO")

Submission status: Wrong Answer

Solution code:
_input = input
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''

#ここに書きたいコードを書く
#データ読み込み
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())

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

input = _input

Submission status: Wrong Answer

Solution code:

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

ans = 'NO'
for a in range(1,T+1):
    A += V
    B += W
    if A == B:
        ans = 'YES'
        break



print(ans)

Submission status: Wrong Answer

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

Demon = A
Kid = B
Judge = 0

for i in range(T):
    if Demon < Kid:
        Demon += V
        Kid += W
    
    else:
        Demon -= V
        Kid -= W
    
    if Demon == Kid:
        Judge = 1
        break
    
if Judge == 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:
    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())
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 = list(map(int, input().split()))
b = list(map(int, input().split()))
t = int(input())
aw = a[0]+a[1]*t
bw = b[0]+b[1]*t
count = 0
if a[0] > b[0]:
  print('NO')
elif aw >= bw:
  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()) 

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

Submission status: Wrong Answer

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

if a == b:
    print('NO')
    exit()
elif b > a:
    if v <= w:
        print('NO')
        exit()

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

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

def oni(a,b,v,w,t):
    for i in range(t):
        if a+v*i >= b+w*i and a<b or a+v*i <= b+w*i and a>b:
            return("YES")
            break
    return("NO")

print(oni(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())
result = "NO"
if V <= W:
    print(result)
else:
    for i in range(T):
        if A < B:
            A = A+V
            B = B+W
            if A == B:
                result = "YES"
                break
        if A > B:
            A = A-V
            B = B-W
            if A == B:
                result = "YES"
                break
    print(result)

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) - t * abs(w - v) > 0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())
c,d=(int(x) for x in input().split())
g=int(input())
if(b>=d):
    f=b-d
elif(d>b):
    f=d-b
if(a>=c):
    e=a-c
elif(c>a):
    e=c-a
if(f*g>e):
    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())
#M=abs(W-V)
#print(M)
print(T*(abs(W-V)))
print(abs(B-A))
M=abs(V*T-W*T)
if(abs(B-A)>M):
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

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

d = b - a
dv = v - w

for i in range(T):
    if int(d) == int(dv) * i:
        print('YES')
if int(d) > int(dv) * T:
    print('NO')

Submission status: Wrong Answer

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

if a < b:
  a_ = a + v * t
  b_ = b + w * t
  if a_ > b_:
    print("Yes")
  else:
    print("No")

if b < a:
  a_ = a - v * t
  b_ = b - w * t
  if a_ > b_:
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

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

if A==B:
    print('YES')
elif W>=B:
    print('NO')
elif abs(A-B)>T*(V-W):
    print('NO')
elif abs(B-A)==W:
    print('YES')
elif abs(B-A)%(W)==0 and 2*W==V:
    print('YES')
else:
    print('NO')