Pagini recente » Cod sursa (job #3312369) | Cod sursa (job #1449993) | Cod sursa (job #1446568) | Cod sursa (job #2130187) | Cod sursa (job #1021269)
#include<iostream>
#include<fstream>
using namespace std;
#define MAX_N 10000001
bool h[MAX_N];
long n;
int main(){
ifstream fin("hashuri.in");
ofstream fout ("hashuri.out");
fin >> n;
long cmd, x;
for(int i=1; i<=n; i++){
fin >> cmd >> x;
if(cmd == 1){
h[x] = true;
}else if(cmd == 2){
h[x] = false;
}else{
if(h[x]) fout << 1 << '\n';
else fout << 0 << '\n';
}
}
return 0;
}