Cod sursa(job #2763089)
| Utilizator | Data | 11 iulie 2021 15:50:51 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.45 kb |
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
unordered_map <int, int> M;
int x, op, n, i;
int main() {
ios_base::sync_with_stdio(false);
cin >> n;
for(i = 1; i <= n; i++) {
cin >> op >> x;
if(op == 1)
M[x] = 1;
else if(op == 2)
M[x] = 0;
else cout << M[x] << '\n';
}
return 0;
}
