Set Mutations

  • + 0 comments

    Here is my code

    n, A = input(), set(map(int, input().split()))
    
    for _ in range( int( input() ) ):
        operation_name = input().split()[0]
        B = set(map(int, input().split()))
        operation = getattr(A, operation_name)(B)
        
        # operation(B)
        
        
    print(sum(A))