No Idea!

  • + 2 comments

    Try to solve the Problem with intersection(), but it didnt work in some cases... Some ideas?

    n, m = map(int, input().split())
    arr = list(map(int, input().split()))
    a = set(map(int, input().split()))
    b = set(map(int, input().split()))
    
    happ = len(a.intersection(arr))
    sad = len(b.intersection(arr))
    print(happ-sad)