Pagini recente » Cod sursa (job #3142223) | Cod sursa (job #1743283) | Cod sursa (job #2979493) | Cod sursa (job #2122367) | Cod sursa (job #1829722)
#include <fstream>
#include <map>
int main()
{
int n,op,arg;
std::ifstream fin("hashuri.in");
std::ofstream fout("hashuri.out");
std::map<int, bool> test;
fin>>n;
for (int i = 0; i < n; ++i)
{
fin>>op>>arg;
switch(op)
{
case 1:
test[arg] = true;
break;
case 2:
test.erase(arg);
break;
case 3:
fout<<(test.find(arg) != test.end())<<"\n";
break;
}
}
fout.close();
fin.close();
return 0;
}