Pagini recente » Cod sursa (job #1572714) | Cod sursa (job #1292466) | Info Oltenia 2019 Proba pe Echipe Clasele 9 - 10 | Cod sursa (job #983314) | Cod sursa (job #247054)
Cod sursa(job #247054)
fd = open("hashuri.in", "r")
fd_out = open("hashuri.out", "w")
hash = set()
for i in xrange(int(fd.readline())):
op, key = map(int, fd.readline().split(" "))
has_key = key in hash
if op == 1 and not has_key:
hash.add(key)
elif op == 2 and has_key:
hash.remove(key)
elif op == 3:
fd_out.write("%d\n" % int(has_key))