Problem:


Score : 200 points

Problem Statement

Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second.
The other child is now at coordinate B, and she can travel the distance of W per second.

He can catch her when his coordinate is the same as hers.
Determine whether he can catch her within T seconds (including exactly T seconds later).
We assume that both children move optimally.

Constraints

-10^9 \leq A,B \leq 10^9

1 \leq V,W \leq 10^9

1 \leq  T \leq 10^9

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A V
B W
T

Output

If "it" can catch the other child, print YES; otherwise, print NO.

Sample Input 1

1 2
3 1
3

Sample Output 1

YES

Sample Input 2

1 2
3 2
3

Sample Output 2

NO

Sample Input 3

1 2
3 3
3

Sample Output 3

NO



Sample input:
1 2
3 1
3


Sample output:
YES

Submission status: Wrong Answer

Solution code:
A,V = map(int, input().split())
B,W = map(int, input().split())
T = int(input())
if V <= W:
  print('NO')
else:
  for i in range(T):
    if A + V*i == B + W*i:
      print('YES')
      break
    elif i == T-1:
      print('NO')

Submission status: Wrong Answer

Solution code:
a,a2= map(int,input().split())
b,b2= map(int,input().split())

A = a*a2
B = b*b2
T = int(input())
if A <= B and B<=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 (b-a)%(v-w)==0 and (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())
x = []
 
if a < b:
    for i in range(t+1):
          a_ = a + v * i
          b_ = b + w * i
          if a_ == b_:
              x.append(1)
          else:
              x.append(0)
              
 
if b < a:
    for i in range(t+1):
          a_ = a - v * t
          b_ = b - w * t
          if a_ == b_:
              x.append(1)
          else:
              x.append(0)
 
 
if 1 in x:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

@author: sd18016
"""

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

if V == W:
    print("NO")
else:
    if B > A:
        kyori = B-A
        miji = V-W
        if V-W < 0:
            print("NO")
        else:
            if kyori % miji == 0:
                a = kyori // miji
                if a <= T:
                    print("YES")
                else:
                    print("NO")
    else:
        kyori = A-B
        miji = W-V
        if W-V < 0:
            print("NO")
        else:
            if kyori % miji == 0:
                a = kyori // miji
                if a <= T:
                    print("YES")
                else:
                    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 = abs(b - a)
    v_hiku_w = v - w
    if b_hiku_a / v_hiku_w <= t+1:
        ans = 'YES'
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

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

direct_right = True
A_point = A
B_point = B
for i in range(1,T+1) :

   if direct_right : 
      if A_point+(V) == B_point+(W):
         print("YES")
         exit()
      if A_point+(V) > B_point+(W):
         direct_right = False

      A_point = A_point+(V) 
      B_point = B_point+(W)

   else: 
      if A_point-(V) == B_point+(W):
         print("YES")
         exit()
      if A_point-(V) < B_point+(W):
         direct_right = True

      A_point = A_point-(V) 
      B_point = B_point-(W)

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

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

Submission status: Wrong Answer

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

def main():
    A, V = map(int, readline().split())
    B, W = map(int, readline().split())
    T = int(input())
    
    if A == B or V <= W:
        print('NO')
        return

    for _ in range(T):
        if A == B:
            print('YES')
            return
        else:
            A += V
            B += W
    print('NO')
    
main()

Submission status: Wrong Answer

Solution code:
import sys
a,v = map(int,input().split())
b,w = map(int,input().split())
t=int(input())
if a>b:
    if 10**9+a<=t*v:
        print("YES")
        sys.exit()
    zb = b-t*w
    if zb<-(10**9):
        zb=-(10**9)
    if zb<a-v*t:
        print("NO")
        sys.exit()
    if zb>=a-v*t:
        print("YES")
        sys.exit()
if a<b:
    if 10**9-a<=t*v:
        print("YES")
        sys.exit()
    zb=t*w+b
    if zb>=10**9:
        zb=10**9
    if zb>t*v+a:
        print("NO")
        sys.exit()
    if zb<=t*v-a:
        print("YES")
        sys.exit()

Submission status: Wrong Answer

Solution code:
def tag(a,b,v,w,t):
    it = (a+(v*t))*2
    other = (b+(w*t))*2
    res = it-other
    if res>-1:
        return "YES"
    return "NO"

if __name__ == "__main__":
    a,v = map(int,input().split())
    b,w = map(int,input().split())
    t = int(input())
    print(tag(a,b,v,w,t))

Submission status: Wrong Answer

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

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

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


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

Submission status: Wrong Answer

Solution code:
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


if V == W:
    print('NO')
    exit()
if A < B:
    position_flag = True
    if V < W:
        print('NO')
        exit()
else:
    position_flag = False
    if V > W:
        print('NO')
        exit()

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

print('NO')

Submission status: Wrong Answer

Solution code:
AV = [int(x) for x in input().split()]
BW = [int(x) for x in input().split()]
A = AV[0]
V = AV[1]
B = BW[0]
W = BW[1]
T = int(input())
T = float(T)
D = abs(A-B)
S = V-W
print(A,V,B,W,S,D,T)
if S>0:
    T1 = float(D/S)
    print(T1)
    if T1<=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 >= a):
  aa=a+v*t
  bb=b+w*t
  if (bb-aa >=0):
    print ('NO')
  else:
    print ('YES')
else:
  aa=a-v*t
  bb=b-w*t
  if (bb-aa <=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 V <= W:
    print("NO")
    exit()

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

if 0 < X <= 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 (V-W)*i == (B-A):
        print('YES')
        break

else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

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

print('NO')

Submission status: Wrong Answer

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

distance = b - a
speed_remainder = v - w

if distance | speed_remainder <= 0:
    print("NO")
elif distance - t * speed_remainder <= 0:
    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())

v = a[1]
w = b[1]

if v <= w:
    print('NO')
else:
    s = v - w
    d = abs(b[0] - a[0])
    if d % s == 0 and d / s <= t:
        print('YES')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
A, W = map(int,input().split())
B, V = map(int,input().split())
T = int(input())
flag = "NO"
mid = T//2
i = 1
while True:
    i += 1
    a = A + W*mid
    b = B + V*mid
 
    if a == b:
        flag = "YES"
        break
    elif T//(2**(i-3)) == 0:
        break
    elif T//(2**i) == 0:
        if a > b:
            mid = mid - 1
        elif a < b:
            mid = mid + 1
    elif a > b:
        mid = mid - T//(2**i)
    elif a < b:
        mid = mid + T//(2**i)

print(flag)

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 t < abs(a - b)/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 V-W>0:
    ArriveTime = float((A-B)/(V-W))
else:
    ArriveTime = float(100000000000000)

if T >= ArriveTime:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A, V = map(float, input().split())
B, W = map(float, input().split())
T = int(input())
time = 0
if (V != W):
    timeyosou = abs(B-A) /(V-W)

if (V <= W):    #逃げるほうが早い→鬼が端に到達するまでの時間を求める
    if (A < B):
        time = (10**9-A)/V
    else:
        time = (10**9+A)/V
else:
    if (A < B): #鬼の方が早い→途中で追いつくor端まで逃げ切る
        if ((10**9 - B)/W > timeyosou): #逃げが端まで行くのにかかる時間　＞　鬼が追いつく時間　→鬼は追いつく
           time = timeyosou
        else:
            time = (10**9 - A)/V    #そうでないとき→鬼が端までたどり着く時間
    else:
        if ((10**9 + B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 + A)/V
if (T >= time):
    print ("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
a,v = map(int, sys.stdin.readline().rstrip("\n").split())
b,w = map(int, sys.stdin.readline().rstrip("\n").split())
t = int(sys.stdin.readline().rstrip("\n"))

a_trans = a + v * t
b_trans = b + w * t
if a_trans >= b_trans:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
x = []
 
if a < b:
    for i in range(t+1):
          a_ = a + v * i
          b_ = b + w * i
          if a_ == b_:
              x.append(1)

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

 
if 1 in x:
    print('Yes')
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()
atai = Decimal(b-a)/Decimal(v-w)
if Decimal(b-a)%Decimal(v-w)==0 and atai<=t 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())
P = "NO"

if V > W:
    if int(A-B) % int(W-V) == 0:
        if B > A:
            AT = A
            BT = B
            for i in range(T):
                if BT > AT:
                    AT = A + V * (i + 1)
                    BT = B + W * (i + 1)
                    if AT == BT:
                        P = "YES"
                        break
                elif AT > BT:
                    AT = A - V * (i + 1)
                    BT = B - W * (i + 1)
                    if AT == BT:
                        P = "YES"
                        break
        if B < A:
            AT = A
            BT = B
            for i in range(T):
                if BT > AT:
                    AT = A - V * (i + 1)
                    BT = B - W * (i + 1)
                    if AT == BT:
                        P = "YES"
                        break
                elif AT > BT:
                    AT = A + V * (i + 1)
                    BT = B + W * (i + 1)
                    if AT == BT:
                        P = "YES"
                        break
                    
print(P)

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:
        q = (b - a) % (v - w)
        r = (b - a) // (v - w)
        if q == 0 and 0 < r < t + 1:
            print('YES')
        else:
            print('NO')
else:
    if v <= w:
        print('NO')
    else:
        q = (a - b) % (v - w)
        r = (a - b) // (v - w)
        if q == 0 and 0 < r < t + 1:
            print('YES')
        else:
            print('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[0]<child[0]:
    if oni_kyori<child_kyori:
        print('NO')
    else:
        print('YES')
else:
    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())
dis=abs(a-b)
speed=v-w
if speed>0 and dis%speed==0 and dis/speed<=t:
    print("YES")
elif dis==v+w:
    if a<b and b+w*t>10**9:
        print("YES")
    elif b<a and b-w*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,=map(int, input().split())
x=abs(B-A)
v=abs(V-W)
if(x<=v*T):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

if a-b==0 and a_v-b_v == 0:
  flag = 1
elif a-b==0 or a_v-b_v == 0:
  flag = 0
else:
  t_set = (a-b)/(b_v - a_v)

t_int = int(t_set)

if t_set>0:
  if t_int == t_set:
    if 0<t_set and t_set<=t:
      flag = 1
    else:
      flag = 0
  else:
    flag = 0

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

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)

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

t, distance = divmod(distance, diff)
if t > T:
    print("NO")
    sys.exit(0)
if distance == 0:
    print("YES")
    sys.exit(0)

distance = abs(distance - V - W)
T -= t
t, distance = divmod(distance, diff)
if distance == 0 and t <= T:
    print("YES")
    sys.exit(0)
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())
for i in range(T):
  if A + V*i == B + W*i:
    print('YES')
    break
  elif i == T-1:
    print('NO')

Submission status: Wrong Answer

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

if a == b:
    print('No')
    exit()

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

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;

Submission status: Wrong Answer

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

oni = v*t
nige = w*t
sa = abs(b-a)

if oni - nige > sa:
    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())

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


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

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

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

# print(t)
# print(t_j)

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

# print('NO')

for t in range(1, T + 1):
    A += V
    B += W
    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 (v == w):
  ans = t + 1
else:
  ans = (b - a) / (v - w)


if t >= ans:
  if ans > 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())

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

if 1 <= ((B - A) / (V - W)) <= T:
    print('YES')
else:
    print('NO')

# ((B - A) / (V - W)).is_integer() and

Submission status: Wrong Answer

Solution code:
import sys

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

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

x = v - w
y = abs(a - b)
print(y)

if y % x == 0 and y // x <= t:
    if (-1000000000 <= (v * (y // x) + a) <= 1000000000) or (-1000000000 <= (-1 * v * (y // x) + a) <= 1000000000):
        print('YES')
    else:
        print('NO')
else:
    print('NO')

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

    return 'NO'


print(solve())

Submission status: Wrong Answer

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

T = int(input())

A = SD * T
B = SC * T

AD = RD + A

AC = RC + B

if AD >= AC:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
A, V = map(float, input().split())
B, W = map(float, input().split())
T = int(input())
time = 0
if (V != W):
    timeyosou = abs(B-A) /(V-W)

if (V <= W):    #逃げるほうが早い→鬼が端に到達するまでの時間を求める
    if (A < B):
        time = (10**9-A)/V
    else:
        time = (10**9+A)/V
else:
    if (A < B): #鬼の方が早い→途中で追いつくor端まで逃げ切る
        if ((10**9 - B)/W > timeyosou): #逃げが端まで行くのにかかる時間　＞　鬼が追いつく時間　→鬼は追いつく
           time = timeyosou
        else:
            time = (10**9 - A)/V    #そうでないとき→鬼が端までたどり着く時間
    else:
        if ((10**9 + B)/W > timeyosou):
           time = timeyosou
        else:
            time = (10**9 + A)/V
print (time)
if (T >= time):
    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())

def check():
  deltaD=B-A
  deltaV=V-W
  if deltaD==0:
    return 'YES'
  if deltaD<0 and deltaV>=0:
    return 'NO'
  if deltaD>0 and deltaV<=0:
    return 'NO'
  if deltaV!=0 and deltaD>0:
     if T>deltaD//deltaV:
        return 'YES'
  return 'NO'
    
print(check())

Submission status: Wrong Answer

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

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

if A<B:
    t = int((B-A)/(V-W))-1
    A = A + V*t
    B = B + V*t
else:
    t = int((B-A)/(W-V))-1
    A = A - V*t
    B = B - V*t

for _ in range(t,T):
    if A < B:
        if A + V == B + W:
            print("YES")
            exit()
        else:
            A = A + V
            B = B + W
    else:
        if A - V == B - W:
            print("YES")
            exit()
        else:
            A = A - V
            B = B - W
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 = V - W
ans = 'YES'

if v <= 0:
  ans = 'NO'
else: 
  if d / v > T:
    ans = 'NO'
    
if (A + V) % 2 != (B + W) % 2:
  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+2 > w*t:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import math

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

if A>B:
    C=A
    A=B
    B=C

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

    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):
                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:
AV = input().split()
BW = input().split()
T = int(input())

if(int(AV[0]) > int(BW[0])):
  print('NO')

a = int(AV[0]) + int(AV[1]) * T
b = int(BW[0]) + int(BW[1]) * T

if(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 A < B:
    if (A + V * T > B + W * T):
        print("YES")
    else:
        print("NO")

else:
    if (A - V * T < B - W * T):
        print("YES")

    else:
        print("NO")

Submission status: Wrong Answer

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

if v <= w:
  print('NO')
  exit()
elif a > b:
  print('YES')
  exit()
  
oni = a + (v*t)
child = b + (w*t)

if (a < b) and (oni < child):
  print('NO')
elif (a > b) and (oni < child):
  print('YES')
elif 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 V<= W:
  print("NO")
  exit()

if abs(B-A)//(V-W) <= T:
  print("YES")
  
  
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()
atai = Decimal(b-a)/Decimal(v-w)
if atai<=t and a+v*t>=b+w*t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

if(a > b):
    a,b = b,a
    w,v = v,w
diff = b - a
diff2 = w - v

if(diff2 >= 0):
    print('NO')
else:
    if(diff // abs(diff2) <= 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 (b-a)/(v-w)<=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())
x=abs(A[0]-B[0])
v=A[1]-B[1]

if x<=T*v and x % v==0:
    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())
AA = A
BB = B
u = np.array([i for i in range(1,T)])
#print(u)

ans = "NO"
for i in u:
  if BB >= AA:
    AA += V
    BB += W
  else:
    AA -= V
    BB -= W
  if AA == BB:
    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())

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

Submission status: Wrong Answer

Solution code:
import sys

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

if lb[1] == 0:
    print("YES")
    sys.exit()

if la[1] - lb[1] > 0:
    if abs(la[0] - lb[0]) / la[1] - lb[1] <= t:
        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 abs((b-a)/(v-w)) <= t:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

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

catchup_speed = (v - w)
start_dis = (b - a)

max_dis = t*catchup_speed

if start_dis <= max_dis:
    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 w > v:
    print("NO")

oni = v*t
nige = w*t
sa = abs(b-a)

if oni - nige > sa:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
x = []
 
if a < b:
    for i in range(t+1):
          a_ = a + v * i
          b_ = b + w * i
          if a_ == b_:
              x.append(1)
 
if b < a:
    for i in range(t+1):
          a_ = a - v * t
          b_ = b - w * t
          if a_ == b_:
              x.append(1)
 
if 1 in x:
    print('Yes')
else:
    print('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[0]<child[0]:
    if oni_kyori<child_kyori:
        print('NO')
    else:
        print('YES')
else:
    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())

if V-W == 0:
    print("NO")
    import sys
    sys.exit()

# import math
# t = -(A-B)/(V-W)
# if float.is_integer(t):
#     if 1 <= t and t <= math.pow(10, 9):
#         print("YES")
#     else:
#         print("NO")
# else:
#     print("NO")
t = -(A-B)//(V-W)
if A+V*t == B+W*t:
    if 1 <= t and t <= T:
        print("YES")
    else:
        print("NO")
else:
    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())
  ans = True

  a_can_plus = min(a + v * t, 10 ** 8)
  a_can_minus = max(a - v * t, -10 ** 8)
  b_can_plus = min(b + w * t, 10 ** 8)
  b_can_minus = max(b - w * t, -10 ** 8)

  if a > b:
    if b_can_minus < a_can_minus:
      ans = False
    else:
      ans = True  
  elif a < b:
    if a_can_plus < b_can_plus:
      ans = False
    else:
      ans = True
      
  if ans:
    print("YES")
  else:
    print("NO")            


main()

Submission status: Wrong Answer

Solution code:
# import math
# from collections import Counter

# N = int(input()) # 1行, 単数
# arg = list(map(int, input().split())) # 1行, 配列
# D = Counter(arg) # 出現数カウント

# print('Yes')
# print('No')
# print()
A,V = list(map(int, input().split())) # 1行, 配列
B,W = list(map(int, input().split())) # 1行, 配列
T = int(input()) # 1行, 単数

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

A += 10**9
B += 10**9

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

if T >= ArriveTime:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

    diff_dist = abs(a-b)
    diff_speed = abs(v-w)

    if w > v and diff_dist > diff_speed * t:
        print('NO')
    else:
        print('YES')


if 'unittest' not in globals():
    resolve()