Pagini recente » Cod sursa (job #220240) | Cod sursa (job #1991957) | Cod sursa (job #1334466) | Cod sursa (job #3304899) | Cod sursa (job #3318130)
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
int n;
map <int,int> f;
int main() {
fin >> n;
while (n--) {
int op, x;
fin >> op >> x;
if (op == 1)
f[x] = 1;
else if (op == 2)
f[x] = 0;
else {
if (f[x] == 0)
fout << "0\n";
else
fout << "1\n";
}
}
fout << "\n";
return 0;
}