Pagini recente » Diferente pentru utilizator/consstantin intre reviziile 2 si 1 | Cod sursa (job #1522078) | Cod sursa (job #1347105) | Cod sursa (job #2205264) | Cod sursa (job #2616143)
#include <bits/stdc++.h>
using namespace std;
int main() {
ifstream fin("hashuri.in", ios::in);
ofstream fout("hashuri.out", ios::out);
unordered_map<int, int> m;
int n;
fin >> n;
int tip, value;
while (n--) {
fin >> tip >> value;
if (tip == 1) m[value] = 1;
if (tip == 2) m.erase(value);
if (tip == 3) fout << (m.find(value) != m.end());
}
}