Cod sursa(job #2725854)
| Utilizator | Data | 19 martie 2021 19:14:35 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.48 kb |
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
map <int,int> M;
int main()
{
int n; fin >> n;
for(int i = 1; i <= n; ++i) {
int op, x; fin >> op >> x;
if(op == 1)
M[x] = 1;
if(op == 2)
M[x] = 0;
if(op == 3) {
if(M[x] == 0) fout << "0\n";
else fout << "1\n";
}
}
return 0;
}
