You are viewing a single comment's thread. Return to all comments →
Simple Python Solution (using counter):
from collections import Counter n, m = map(int, input().split()) arr = list(map(int, input().split())) A = list(set(map(int, input().split()))) B = list(set(map(int, input().split()))) counter = Counter(arr) ans = sum(counter[i] for i in A if i in counter) - sum(counter[i] for i in B if i in counter) print(ans)
Seems like cookies are disabled on this browser, please enable them to open this website
No Idea!
You are viewing a single comment's thread. Return to all comments →
Simple Python Solution (using counter):