Cod sursa(job #2766860)
Utilizator | Popescu Serban SerbaP123 | Data | 3 august 2021 17:57:13 |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.57 kb |
#include <fstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <cstring>
#include <bitset>
#include <unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
unordered_map <int, int> f;
int n, x, y;
int main(){
cin >> n;
while(n--){
cin >> x >> y;
if(x == 1){
f[y] = 1;
}
else if(x == 2){
f[y] = 0;
}
else{
cout << f[y] << "\n";
}
}
return 0;
}