Beakjoon&프로그래머스/파이썬
[백준/파이썬] 32941번 왜 맘대로 예약하냐고
현장
2024. 12. 24. 15:44
-Code
t, x = map(int, input().split())
n = int(input())
cnt = 0
for _ in range(n):
k = int(input())
a_list = list(map(int, input().split()))
if x in a_list:
cnt += 1
print("YES" if cnt == n else "NO")