You are viewing a single comment's thread. Return to all comments →
n,m = input().split() n_arr = input().split() a = set(input().split()) b = set(input().split())
def happiness(): h =0 for i in n_arr: if i in a: h+=1 elif i in b: h-=1 else: h=h return h 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 = input().split() n_arr = input().split() a = set(input().split()) b = set(input().split())
def happiness(): h =0 for i in n_arr: if i in a: h+=1 elif i in b: h-=1 else: h=h return h print(happiness())