Pagini recente » Cod sursa (job #2268394) | Cod sursa (job #885999) | Cod sursa (job #2540865) | Cod sursa (job #2981060) | Cod sursa (job #2461834)
#include <stdio.h>
#include <map>
using namespace std;
int N, NR;
map<int, int> M;
int main()
{
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
int i, tip, x;
scanf("%d ", &N);
for (i = 1; i <= N; i++)
{
scanf("%d %d ", &tip, &x);
if (tip == 1 && M[x] == 0)
M[x] = ++NR;
if (tip == 2)
M[x] = 0;
if (tip == 3)
printf("%d\n", M[x] != 0);
}
return 0;
}