Cod sursa(job #2733716)
| Utilizator | Data | 30 martie 2021 19:28:59 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.27 kb |
#include <fstream>
#include <unordered_map>
using namespace std;ifstream fin("hashuri.in");ofstream fout("hashuri.out");int n,p,x;unordered_map<int, int> M;int main(){for (fin>>n;n;--n){fin >> p >> x;if (p == 1) M[x] = 1;else if (p == 2) M[x] = 0;else fout << M[x] << '\n';}}
