Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- vector<long long> v1;
- v1.resize(n);
- for(int i = 0; i < n; i++)
- cin>>v1[i];
- sort(v1.begin(), v1.end());
- auto last = unique(v1.begin(), v1.end());
- v1.erase(last, v1.end());
- for(auto i : v1)
- cout<<i<<' ';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement