Pagini recente » Cod sursa (job #2550923) | Cod sursa (job #2328304) | Cod sursa (job #260778) | Cod sursa (job #2884922) | Cod sursa (job #2623690)
// map sau unordered_map > 0 puncte
#include <bits/stdc++.h>
using namespace std;
int main() {
ifstream fin("hashuri.in", ios::in);
ofstream fout("hashuri.out", ios::out);
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[value] << '\n';
}
}