Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a, b = map(int, input().split())
- A = set()
- B = set()
- for i in range(a):
- now = int(input())
- A.add(now)
- for i in range(b):
- now = int(input())
- B.add(now)
- f = A & B
- print(len(f))
- print(*sorted(f))
- s = A - B
- print(len(s))
- print(*sorted(s))
- t = B - A
- print(len(t))
- print(*sorted(t))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement