You are viewing a single comment's thread. Return to all comments →
n_A = int(input()) A = set(map(int, input().split())) N = int(input()) for _ in range(N): cmd, len = input().split() B = set(map(int, input().split())) if(cmd == "intersection_update"): A.intersection_update(B) elif(cmd == "update"): A |= B elif(cmd == "difference_update"): A.difference_update(B) elif(cmd == "symmetric_difference_update"): A ^= B 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 →
For Python3 Platform