No Idea!

  • + 0 comments
    from collections import Counter
    arrL,setL = input().split()
    arr = input().split()
    setA = set(input().split())
    setB = set(input().split())
    happy = 0
    coun = Counter(arr)
    
    for i in setA:
        happy += coun[i]
    for i in setB:
        happy -= coun[i]
    print(happy)