Pagini recente » Cod sursa (job #212458) | Cod sursa (job #2063310) | Cod sursa (job #582460) | Cod sursa (job #3146967) | Cod sursa (job #1096378)
#include <cstdio>
#include <map>
using namespace std;
int T, count;
map <int, int> M;
int main ()
{
freopen ("hashuri.in", "r", stdin);
freopen ("hashuri.out", "w", stdout);
scanf ("%d", &T);
while (T--)
{
int type, x;
scanf ("%d %d", &type, &x);
if (type == 1 && M.find (x) == M.end ()) M[x] = ++count;
if (type == 2) M.erase (x);
if (type == 3) printf ("%d\n", M.find (x) != M.end ());
}
return 0;
}