Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bisect import bisect_left, bisect_right
- n, k = map(int, input().split())
- a = [int(x) for x in input().split()]
- for y in input().split():
- y = int(y)
- if bisect_left(a, y) != bisect_right(a, y):
- print("YES")
- else:
- print("NO")
Advertisement
Add Comment
Please, Sign In to add comment