Algorithm/PS
[BOJ/백준] 7782 - Alien [python]
chanwoong1
2023. 3. 20. 18:53
728x90
7782번: Alien
Once upon a time after winning another competition at KBTU, Bakhytzhan, Askar and Artem walked throw the Old Square. When they found some interesting rectangle lines on the asphalt, they stopped and screamed out ”R tree”. They screamed so loud that all
www.acmicpc.net
문제 풀이
두 번째 줄의 입력값을 받아, 그 다음 줄부터의 입력 중 두 번째 줄의 입력값이 포함된다면 "Yes", 아니라면 "No"를 출력한다.
정답 코드
n = int(input())
b1, b2 = map(int, input().split())
for _ in range(n) :
a, b, c, d = map(int, input().split())
if a <= b1 and c >= b1 and b <= b2 and d >= b2 :
print("Yes")
exit(0)
print("No")
728x90