Cod sursa(job #1409540)
| Utilizator | Data | 30 martie 2015 16:18:25 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.52 kb |
#include <bits/stdc++.h>
#define mod 100003
using namespace std;
unordered_map<int, bool>M;
int N, x, t;
int main()
{
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
scanf("%d", &N);
for(; N; N--)
{
scanf("%d%d", &t, &x);
if(t == 1)
{
M[x] = 1;
continue;
}
if(t == 2)
{
M[x] = 0;
continue;
}
M[x] ? printf("1\n") : printf("0\n");
}
return 0;
}
