Pagini recente » Cod sursa (job #2698838) | Cod sursa (job #1599987) | Cod sursa (job #56252) | Cod sursa (job #1102462) | Cod sursa (job #2181413)
#include <iostream>
#include <map>
#include <fstream>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n,op,elem,curent;
map<int,int>Ma;
int main()
{
f>>n;
while (n--)
{
f>>op>>elem;
if (op==1&&Ma.find(elem)==Ma.end())
Ma[elem]=++curent;
if (op==2)
Ma.erase(elem);
if (op==3)
g<<(Ma.find(elem)!=Ma.end())<<'\n';
}
return 0;
}