Challenge - #40 - No Idea!

 n,m = map(intinput().split())

array = list(map(intinput().split()))
set_a = set(map(intinput().split()))
set_b = set(map(intinput().split()))

happiness = 0 

for i in array :
    if i in set_a :
        happiness += 1
    elif i in set_b :
        happiness -= 1
    else :
        pass
print(happiness)

Comments

Popular posts from this blog

Challenge - #48 - Incorrect Regex

Challenge - #43 - Time Delta