Pagini recente » Cod sursa (job #595359) | Cod sursa (job #1819223) | Cod sursa (job #114196) | Cod sursa (job #2529375) | Cod sursa (job #1829719)
#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[arg]<<"\n";
break;
}
}
fout.close();
fin.close();
return 0;
}