Skip to content

Instantly share code, notes, and snippets.

@mym0404
Created May 24, 2022 09:54
Show Gist options
  • Save mym0404/b3c69ce335adc36ed751bdec2e2596ce to your computer and use it in GitHub Desktop.
Save mym0404/b3c69ce335adc36ed751bdec2e2596ce to your computer and use it in GitHub Desktop.
N, M = map(int, input().split())
A = set(map(int, input().split()))
B = set(map(int, input().split()))
C = set()
for a in A:
if a not in B:
C.add(a)
for b in B:
if b not in A:
C.add(b)
print(len(C))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment