Cod sursa(job #2951156)
Utilizator | Data | 5 decembrie 2022 16:14:19 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-32 | Status | done |
Runda | Arhiva educationala | Marime | 0.4 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
unordered_map<int ,int> m;
int main()
{
int nr, o, x;
f >> nr;
for(int j = 1; j <= nr; ++ j)
{
f >> o >> x;
if(o == 1)
m[x] = 1;
else if(o == 2)
m[x] = 0;
else
g << m[x] << '\n';
}
return 0;
}