Pagini recente » Cod sursa (job #2568643) | Monitorul de evaluare | Cod sursa (job #650392) | Cod sursa (job #2336742) | Cod sursa (job #1120722)
#include <stdio.h>
#include <set>
using namespace std;
set <int> S;
int main() {
freopen ("hashuri.in", "r", stdin);
freopen ("hashuri.out", "w", stdout);
int N, i, opt, x;
scanf ("%d", &N);
for (i = 1; i <= N; ++i) {
scanf ("%d %d", &opt, &x);
if (opt == 1) S.insert(x);
if (opt == 2) S.erase(x);
if (opt == 3) printf ("%d\n", S.find(x) != S.end());
}
return 0;
}