Mai intai trebuie sa te autentifici.
Cod sursa(job #715968)
Utilizator | Data | 18 martie 2012 00:06:56 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <cstdio>
#include <map>
using namespace std;
int n, i, y, x;
map <int, int> 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;
if (y == 2) a.erase(x);
if (y == 3) printf("%d\n", a.find(x)!=a.end());
}
return 0;
}