Cod sursa(job #1347211)
| Utilizator | Data | 18 februarie 2015 20:49:51 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.52 kb |
#include <iostream>
#include <fstream>
#include <tr1/unordered_map>
using namespace std;
ifstream in ("hashuri.in");
ofstream out ("hashuri.out");
tr1 :: unordered_map <int, int> M;
int main()
{
int N, op, x;
in >> N;
while (N --){
in >> op >> x;
if (op == 1)
M[x] = 1;
if (op == 2)
M[x] = 0;
if (op == 3)
if (M[x])
out << "1\n";
else
out << "0\n";
}
return 0;
}
