Cod sursa(job #3131303)
| Utilizator | Data | 19 mai 2023 18:54:49 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
int main()
{
unordered_map<long long, int>h;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n, o, x;
fin>>n;
for(int i = 0; i < n; i++)
{
fin>>o>>x;
if(o == 1)
h[x] = 1;
else if(o == 2)
h[x] = 0;
else
fout<<h[x]<<endl;
}
fin.close();
fout.close();
return 0;
}
