Pagini recente » infoarena - comunitate informatica, concursuri de programare | Rezultatele filtrării | Cod sursa (job #962238) | Cod sursa (job #1367461) | 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))