# Enter your code here. Read input from STDIN. Print output to STDOUT import re for i in range ( int ( input ())): try : re. compile ( input ()) print ( True ) except : print ( False )
n = int ( input ()) s = set ( map ( int , input ().split())) for i in range ( int ( input ())): inp = input () if inp == "pop" : s.pop() else : command , value = inp.split() if command == "discard" : s.discard( int (value)) else : s.remove( int (value)) print ( sum (s))
Comments
Post a Comment