Pagini recente » Cod sursa (job #2367035) | Cod sursa (job #2004360) | Cod sursa (job #1708898) | Cod sursa (job #722728) | Cod sursa (job #2633376)
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
int T, p, x;
unordered_map <int,int> m;
int main()
{
ios_base::sync_with_stdio(0);
in.tie(0),out.tie(0);
in >> T;
while(T--)
{
in >> p >> x;
if(p == 1)
{
m[x] = 1;
}
else if(p == 2)
{
m[x] = 0;
}
else
out << m[x] << '\n';
}
return 0;
}