Pagini recente » Rating Stan George Alexandru (stangeorge10) | Cod sursa (job #2076329) | Cod sursa (job #1894943) | Istoria paginii runda/hc_round4/clasament | Cod sursa (job #1037949)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n, x;
int t;
unordered_map<int, int> m;
int main()
{
f>>n;
while(n--){
f>>t>>x;
if(t==1) m[x]=1;
if(t==2) m[x]=0;
if(t==3)
if(m[x]) g<<1<<'\n';
else g<<0<<'\n';
}
return 0;
}