Cod sursa(job #2958084)
| Utilizator | Data | 24 decembrie 2022 15:32:04 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.39 kb |
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
int n , op , a;
unordered_map <int,int> m;
int main()
{
cin >> n;
while(n--){
cin >> op >> a;
if( op == 1 ) m[a] = 1;
if( op == 2 ) m[a] = 0;
if( op == 3 ) cout << m[a] << '\n';
}
return 0;
}
