Pagini recente » Monitorul de evaluare | Borderou de evaluare (job #2482692) | Cod sursa (job #1752309) | Monitorul de evaluare | Cod sursa (job #2549271)
#include <bits/stdc++.h>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
set <int> S;
int n, q, x, y;
int main()
{
in >> n;
while(n--)
{
in >> q;
if(q == 1)
{
in >> x;
S.insert(x);
}
else if(q == 3)
{
in >> x;
if(S.find(x) != S.end()) out << 1 << '\n';
else out << 0 << '\n';
}
else
{
in >> x;
S.erase(x);
}
}
return 0;
}