Pagini recente » Cod sursa (job #3176579) | Rating Rares Visalom Mihail (Raresvis) | Cod sursa (job #2169532) | Cod sursa (job #1774253) | Cod sursa (job #247053)
Cod sursa(job #247053)
fd = open("hashuri.in", "r")
fd_out = open("hashuri.out", "w")
hash = dict()
for i in xrange(int(fd.readline())):
op, key = map(int, fd.readline().split(" "))
has_key = hash.has_key(key)
if op == 1 and not has_key:
hash[key] = True
elif op == 2 and has_key:
del hash[key]
elif op == 3:
fd_out.write("%d\n" % int(has_key))