We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
# Enter your code here. Read input from STDIN. Print output to STDOUTimportcollectionsif__name__=='__main__':contain=list(map(int,input().split(' ')))alist=list(map(str,input().split(' ')))a=set(map(str,input().split(' ')))b=set(map(str,input().split(' ')))fs=collections.Counter(alist)ha=0hb=0forcina:ifcinfs.keys():ha=ha+int(fs[c])forcinb:ifcinfs.keys():hb=hb+int(fs[c])print(ha-hb)
n, m = map(int, input().split())
narr = list(map(int, input().split()))
A = set(map(int, input().split()))
B = set(map(int, input().split()))
happiness = 0
for i in narr:
if i in A:
happiness += 1
elif i in B:
happiness -= 1
else:
happiness = happiness
print(happiness)
n, m = map(int, input().split()) narr = list(map(int, input().split())) A = set(map(int, input().split())) B = set(map(int, input().split())) happiness = 0 for i in narr: if i in A: happiness += 1 elif i in B: happiness -= 1 else: happiness = happiness print(happiness)
n,m = map(int,input().split())
a = list(map(int,input().split()))
A = set(map(int,input().split()))
B = set(map(int,input().split()))
happiness=0
for i in a:
print(happiness)