Pagini recente » Cod sursa (job #135574) | Cod sursa (job #2894955) | Cod sursa (job #2029776) | Cod sursa (job #1503175) | Cod sursa (job #3206879)
#include<fstream>
#include<unordered_set>
std::ifstream fin("hashuri.in");
std::ofstream fout("hashuri.out");
std::unordered_set<int> S;
int n, task, x;
int main(){
fin >> n;
while(n--){
fin >> task >> x;
if(task == 1){
S.insert(x);
}
else if(task == 2){
S.erase(x);
}
else if(task == 3){
if(S.find(x) == S.end())
fout << "0\n";
else
fout << "1\n";
}
}
}