Pagini recente » Cod sursa (job #2960440) | Cod sursa (job #1971379) | Cod sursa (job #1283227) | Diferente pentru problema/grendizer intre reviziile 18 si 19 | Cod sursa (job #1973318)
#include <stdio.h>
#include <unordered_map>
FILE *f1 = fopen("hashuri.in","r");
FILE *f2 = fopen("hashuri.out","w");
std::unordered_map<int,bool> h;
int n,op,el;
int main()
{
fscanf(f1,"%d",&n);
while(n--)
{
fscanf(f1,"%d%d",&op,&el);
if(op == 1)
h[el] = true;
if(op == 2)
h[el] = false;
if(op == 3)
fprintf(f2,"%d\n",h[el]);
}
return 0;
}