Set .union() Operation

  • + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    m = int(input())
    arr1 = set(map(int,input().split()))
    n = int(input())
    arr2 = set(map(int, input().split()))
    print(len(arr1.union(arr2)))