Pagini recente » concurs_11_12_02_26 | Cod sursa (job #2033056) | Cod sursa (job #3140754) | Cod sursa (job #2696749) | Cod sursa (job #1243700)
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
ifstream f ("hashuri.in");
ofstream g ("hashuri.out");
const int NMAX = 1000000;
int n;
map <int, int> M;
void rezolva() {
int tip, x, id = 0;
while (n--) {
f >> tip >> x;
if (tip == 1) {
if (M.find(x) == M.end()) M[x] = ++id;
}
else if (tip == 2) M.erase(x);
else if (tip == 3) g << (M.find(x) != M.end()) << '\n';
}
}
int main() {
f >> n;
rezolva();
return 0;
}