Cod sursa(job #2195785)
Utilizator | Data | 17 aprilie 2018 13:24:43 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
int n, cod, x;
unordered_map <int, bool> mp;
int main(){
in >> n;
while(n--){
in >> cod >> x;
if(cod == 1)
mp[x] = 1;
else if(cod == 2)
mp[x] = 0;
else out << mp[x] << '\n';
}
return 0;
}