Pagini recente » Cod sursa (job #67589) | Cod sursa (job #32753) | Cod sursa (job #2819618) | Cod sursa (job #2134778) | Cod sursa (job #721240)
Cod sursa(job #721240)
#include <cstdio>
#include <map>
using namespace std;
int n, i, y, x;
map <bool, bool> a;
int main()
{
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
for(scanf("%d ", &n); n; --n)
{
scanf("%d %d", &y, &x);
if (y == 1)
{
a[x]=1;
continue;
}
if (y == 2)
{
a.erase(x);
continue;
}
if (y == 3)
{
printf("%d\n", a.find(x)!=a.end());
continue;
}
}
return 0;
}