Cod sursa(job #1925772)
Utilizator | Data | 13 martie 2017 17:57:54 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.33 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';
}
}