Pagini recente » Cod sursa (job #1622806) | Cod sursa (job #793911) | Cod sursa (job #291697) | Cod sursa (job #2923403) | Cod sursa (job #1195889)
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int N,op,x;
map <int,int> M;
int main()
{
f >> N;
for (int i=1; i<=N ; i++)
{
f >> op >> x;
if (op == 1 && M.find(x) == M.end()) M[x] = 1;
if (op == 2 ) M.erase(x);
if (op == 3 ) g << (M.find(x) != M.end()) << '\n';
}
return 0;
}