Pagini recente » Profil Sykz | Cod sursa (job #2429056) | Cod sursa (job #1567389) | Cod sursa (job #153003) | Cod sursa (job #1410347)
#include <fstream>
#include <unordered_set>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
unordered_set <int> myHash;
int n, x, op, t;
int main()
{
fin >> n;
for (int i=1; i<=n; i++)
{
fin >> op >> x;
if (op==1)
myHash.insert(x);
else if (op==2)
myHash.erase(x);
else
if (myHash.find(x)==myHash.end())
fout << 0 << '\n';
else fout << '\n';
}
fin.close();
fout.close();
return 0;
}