#include <iostream>
#include <algorithm>

int main() {
    int arr[] = { 1,2,3,4,5,3,3,5,4 };
    std::sort( std::begin(arr), std::end(arr) );
    auto end = std::unique( std::begin(arr), std::end(arr) );
    for( auto it = std::begin(arr); it != end; ++it )
        std::cout << *it << ' ';
    std::cout << std::endl;
    return 0;
}