Josif_tepe

Untitled

May 15th, 2026
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <set>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     multiset<int> ms1;
  8.     multiset<int> ms2 = {5, 3, 3, 1};
  9.     for (int i : ms2)
  10.         cout << i << " ";
  11.     cout << endl;
  12.    
  13.     for(multiset<int>::iterator it = ms2.begin(); it != ms2.end(); it++){
  14.         cout<<*it<< " ";
  15.     }
  16.  
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment