Cod sursa(job #2690256)
Utilizator | Data | 23 decembrie 2020 14:41:51 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n, op, x;
unordered_map <int, bool> H;
int main(){
f >> n;
while(n--){
f >> op >> x;
if(op == 1) H[x] = 1;
if(op == 2) H[x] = 0;
if(op == 3) g << H[x] << "\n";
}
}