You are viewing a single comment's thread. Return to all comments →
_,A,N = int(input()),set(map(int,input().split())),int(input()) operations = { "update" : A.update, "intersection_update" : A.intersection_update, "difference_update" : A.difference_update, "symmetric_difference_update" : A.symmetric_difference_update } for _ in range(N): opr = input().split()[0] B = set(map(int,input().split())) operations[opr] print(sum(A))
Seems like cookies are disabled on this browser, please enable them to open this website
Set Mutations
You are viewing a single comment's thread. Return to all comments →