Challenge - #40 - No Idea!

 n,m = map(int, input().split())

array = list(map(int, input().split()))
set_a = set(map(int, input().split()))
set_b = set(map(int, input().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 - #39 - Symmetric Difference

Challenge - #48 - Incorrect Regex

Challenge - #28 - itertools.product()