You are viewing a single comment's thread. Return to all comments →
n, m = map(int, input().split(" "))
my_list = list(map(int, input().split(" ")))
set_a = set(map(int, input().split(" ")))
set_b = set(map(int, input().split(" ")))
happiness = 0
for i in my_list:
if i in set_a: happiness += 1 elif i in set_b: happiness -= 1 else: happiness
print(happiness)
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 →
n, m = map(int, input().split(" "))
my_list = list(map(int, input().split(" ")))
set_a = set(map(int, input().split(" ")))
set_b = set(map(int, input().split(" ")))
happiness = 0
for i in my_list:
print(happiness)