Cod sursa(job #1728444)
Utilizator | Data | 12 iulie 2016 22:16:07 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.45 kb |
#include <fstream>
#include <cstdio>
#include <map>
using namespace std;
int N, i, op, x;
map<int, int> dp;
int main()
{
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
scanf("%d", &N);
for (i=1; i<=N; i++)
{
scanf("%d %d", &op, &x);
if (op==1)
dp[x]=1;
if (op==2)
dp[x]=0;
if (op==3)
printf("%d\n", dp[x]);
}
return 0;
}