Pagini recente » Diferente pentru problema/march intre reviziile 42 si 41 | Cod sursa (job #1766329) | Cod sursa (job #1381094) | Cod sursa (job #139421) | Cod sursa (job #2307198)
def main():
store = set()
with open('hashuri.in') as fin, open('hashuri.out', 'w') as fout:
fin.readline()
for query in fin:
qtype, elem = list(map(int, query.split()))
if qtype == 1:
store.add(elem)
if qtype == 2:
store.discard(elem)
if qtype == 3:
print('1' if elem in store else '0', file=fout)
if __name__ == '__main__':
main()