No Idea!

  • + 0 comments

    For future reference: Do not cast the full main list of objects as a set. Using a list is necessary to maintain the integrity of the count, including duplicates.

    n, l = input(), list(map(int, input().split()))
    a, b = set(map(int, input().split())), set(map(int, input().split()))
    print(len([x for x in l if x in a]) - len([x for x in l if x in b]))