Cod sursa(job #1379987)
Utilizator | Data | 6 martie 2015 20:53:06 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.34 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n;
map <long long, bool> m;
int main()
{
fin >> n;
for (int tip, x; n; --n)
{
fin >> tip >> x;
if (tip == 1) m[x] = 1;
else if (tip == 2) m[x] = 0;
else fout << m[x] << '\n';
}
return 0;
}