Cod sursa(job #3235630)
Utilizator | Data | 19 iunie 2024 12:34:00 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.4 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int, bool> fr;
int main()
{
int n, x, p;
fin >> n;
while(n--)
{
fin >> p >> x;
if(p == 1)
fr[x] = 1;
if(p == 2)
fr[x] = 0;
if(p == 3)
fout << fr[x] << "\n";
}
return 0;
}