You are viewing a single comment's thread. Return to all comments →
n = int(input()) a = set(map(int, input().split())) m = int(input()) for _ in range(m): operation, _ = input().split() other_set = set(map(int, input().split())) getattr(a, operation)(other_set) 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 →