-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnoidea.py
More file actions
38 lines (36 loc) · 778 Bytes
/
Copy pathnoidea.py
File metadata and controls
38 lines (36 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
n,m=map(int, input().split())
array=input().split()
d={}
for i in array:
try:d[i]+=1
except KeyError:d[i]=1
seta=set(input().split())
setb=set(input().split())
happiness=0
for i in d:
if i in seta:
happiness+=int(d[i])
seta.remove(i)
elif i in setb:
happiness-=int(d[i])
setb.remove(i)
print(happiness)
# n,m=map(int, input().split())
# d={}
# array=input().split()
# for i in array:
# try:
# if d[i]==True:continue
# except KeyError:d[i]=True
# seta=set(input().split())
# setb=set(input().split())
# happiness=0
# for i in seta:
# try:
# if d[i]:happiness+=1
# except KeyError:continue
# for i in setb:
# try:
# if d[i]:happiness-=1
# except KeyError:continue
# print(happiness)