Pagini recente » Cod sursa (job #598849) | Cod sursa (job #1644534) | Cod sursa (job #2220919) | Cod sursa (job #3169491) | Cod sursa (job #1021267)
#include<iostream>
#include<fstream>
using namespace std;
#define MAX_N 1000001
bool h[MAX_N];
int n;
int main(){
ifstream fin("hashuri.in");
ofstream fout ("hashuri.out");
fin >> n;
int 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;
}