fork(1) download
  1. #include <iostream>
  2. #include <set>
  3. #include <string>
  4. #include <iterator>
  5. #include <algorithm>
  6.  
  7. int main() {
  8.  
  9. std::set<std::string> ss;
  10.  
  11. std::copy( std::istream_iterator<std::string>(std::cin), std::istream_iterator<std::string>(), std::inserter( ss, ss.begin() ) );
  12.  
  13. std::copy( ss.begin(), ss.end(), std::ostream_iterator<std::string>(std::cout, " ") );
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3436KB
stdin
Extends the container by inserting new elements effectively increasing the container size by the number of elements inserted.
stdout
Extends by container effectively elements increasing inserted. inserting new number of size the