#include <iostream>
#include <vector>
#include <unordered_set>
void print(std::unordered_set<int> const &us) {
for (auto const &n: us) {
std::cout << n << " ";
}
}
int main()
{
std::vector<int> v = { 1, 5, 2, 7, 4, 9, 12 };
std::unordered_set<int> us(v.begin(), v.end());
print(us);
}
/*
run:
4 7 9 2 12 5 1
*/