← Back to List

3622번: 어떤 호박의 할로윈 여행 ↗

Solutions

Python 3
649 B | 649 chars
import sys
from math import sqrt, pi, sin, factorial, ceil, floor
from datetime import datetime, timedelta

BLANK = " "

#inp = input
inp = lambda : sys.stdin.readline()[:-1].strip()
mii = lambda x = BLANK : [*map(int,inp().split(x))]
mfi = lambda x = BLANK : [*map(float,inp().split(x))]
ii = lambda : int(inp())
fi = lambda : float(inp())
p = print


def solve():
  A, a, B, b, P = mii()
  
  if B > P or A > P:
    return False
  
  if A + B <= P:
    return True

  if a >= B or b >= A:
    return True
  
  return False
  
    
if __name__ == "__main__":
  tc = 1

  for t in range(1, tc+1):
    ret = solve()
    
    p("Yes" if ret else "No")