Cod sursa(job #2868764)
Utilizator | Data | 11 martie 2022 10:15:27 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.45 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in ("hashuri.in");
ofstream out ("hashuri.out");
unordered_map<int, bool>m;
int main()
{
int q;
in >> q;
while (q--){
int oper, x;
in >> oper >> x;
if (oper == 1)
m[x]=1;
else if (oper == 2)
m[x]=0;
else
{
out << m[x];
out << '\n';
}
}
return 0;
}