#include
#include
#include
#include
#include
using namespace std;
int main()
{
vectorcoll;
copy (istream_iterator(cin), //start of the source
istream_iterator(), //end of the source
back_inserter(coll)); //Final destination... :)
//To sort the elements
sort (coll.begin(), coll.end());
unique_copy (coll.begin(), coll.end(), //source
ostream_iterator(cout, "\n"));
//destination
return 0;
}
No comments:
Post a Comment