#include <iostream>
#include<set>
using namespace std;
int main() {
int a[] = {1,2,2,4};
std::set<int> s{1,2,3,4};
std::set<int> s1{std::begin(a), std::end(a)};
for(auto f =s1.begin();f!=s1.end();f++)
cout<<*f<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZTxzZXQ+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkKCWludCBhW10gPSB7MSwyLDIsNH07CnN0ZDo6c2V0PGludD4gc3sxLDIsMyw0fTsKCnN0ZDo6c2V0PGludD4gczF7c3RkOjpiZWdpbihhKSwgc3RkOjplbmQoYSl9OwoJZm9yKGF1dG8gZiA9czEuYmVnaW4oKTtmIT1zMS5lbmQoKTtmKyspCgljb3V0PDwqZjw8ZW5kbDsKCXJldHVybiAwOwp9