Pagini recente » Cod sursa (job #3132539) | Cod sursa (job #407194) | Cod sursa (job #2761709) | Cod sursa (job #2825059) | Cod sursa (job #1506154)
#include <fstream>
#include <ctime>
#include <cstdlib>
#include <set>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
int N;
set<int> S;
int main() {
int type; int x;
fin >> N;
while(N--) {
fin >> type >> x;
switch(type) {
case 1: S.insert(x); break;
case 2: S.erase(x); break;
case 3: fout << (S.find(x) != S.end()) << '\n'; break;
}
}
return 0;
}