Cod sursa(job #2763087)
Utilizator | Data | 11 iulie 2021 15:48:59 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.41 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() {
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;
}