Pagini recente » Cod sursa (job #942388) | Cod sursa (job #2830196) | Cod sursa (job #558035) | Cod sursa (job #1982982) | Cod sursa (job #653112)
Cod sursa(job #653112)
#include <stdio.h> //99999989
int a[100000000];
int main()
{
long long n,i,j,opt,x,nr=549979;
j=freopen("hashuri.in","r",stdin);
j=freopen("hashuri.out","w",stdout);
j=scanf("%lld", &n);
for (i=1;i<=n;i++){
j=scanf("%lld %lld", &opt, &x);
x%=nr;
switch(opt){
case 1:{
a[x]=1;
break;
}
case 2:{
a[x]=0;
break;
}
case 3:{
if (a[x])
printf("1\n");
else
printf("0\n");
}
}
}
return 0;
}