Pagini recente » Cod sursa (job #535780) | Cod sursa (job #1688447) | Cod sursa (job #1425855) | Cod sursa (job #1432620) | Cod sursa (job #2846646)
#include<iostream>
#include<fstream>
#include<map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
map<int,int> mapa;
int n;
void operatie()
{
int tip,x;
fin>>tip>>x;
if(tip==1)
mapa[x]=1;
else
if(tip==2)
mapa[x]=0;
else
fout<<mapa[x]<<'\n';
}
int main()
{
ios::sync_with_stdio(false);
fin>>n;
while(n--)
operatie();
return 0;
}