Cod sursa(job #2981020)
| Utilizator | Data | 17 februarie 2023 02:02:42 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.52 kb |
#include <algorithm>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <unordered_map>
using namespace std;
#ifdef LOCAL
ifstream fin("input.txt");
#define fout cout
#else
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
#define endl '\n'
#endif
int n;
unordered_map<int, bool> mp;
int t, x;
int main() {
fin >> n;
while (n--) {
fin >> t >> x;
if (t == 1) mp[x] = 1;
else if (t == 2) mp[x] = 0;
else fout << mp[x] << endl;
}
return 0;
}
