Cod sursa(job #2689583)
Utilizator | Data | 21 decembrie 2020 14:24:35 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
int N,x,t;
unordered_map<int,bool> M;
int main()
{
//ios_base::sync_with_stdio(0);cin.tie(0);
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
cin >> N;
//M.reserve(N);
while(N--)
{
cin >> t >> x;
if(t == 1)
M[x]=1;
else if(t == 2)
M[x]=0;
else
cout << M[x] << '\n';
}
}