fork download
  1. #include <iostream>
  2. #include <set>
  3. #include <algorithm>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. int main() {
  8. // your code goes here
  9. std::multiset<int> a {1,2,3};
  10. std::multiset<int> b {1,2,3};
  11.  
  12. std::multiset<int> result;
  13. merge( a.begin(), a.end(), b.begin(), b.end(),
  14. std::inserter(result, result.begin()));
  15. std::cout<<result.size()<<std::endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
6