Cod sursa(job #3230775)
| Utilizator | Data | 22 mai 2024 19:32:28 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.45 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int, bool> fr;
int main()
{
ios_base::sync_with_stdio(false);
fin.tie(NULL);
int n, x, p;
fin >> n;
while(n--)
{
fin >> p >> x;
if(p == 1) fr[x] = 1;
else if(p == 2) fr[x] = 0;
else fout << fr[x] << "\n";
}
fin.close();
fout.close();
return 0;
}
