Advertisement
Josif_tepe

Untitled

Feb 3rd, 2023
826
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <queue>
  3. #include <cstring>
  4. #include <stack>
  5. #include <fstream>
  6. #include <set>
  7. using namespace std;
  8. typedef long long ll;
  9.  
  10. int main() {
  11.     ios_base::sync_with_stdio(false);
  12.     multiset<int> m;
  13.    
  14.     m.insert(1);
  15.     m.insert(2);
  16.     m.insert(3);
  17.     m.insert(1);
  18.  
  19.     m.insert(5);
  20.    
  21.     for(multiset<int>::iterator it = m.begin(); it != m.end(); it++) {
  22.         cout << *it << " ";
  23.     }
  24.     cout << endl;
  25.     m.erase(5);
  26.    
  27.     for(multiset<int>::iterator it = m.begin(); it != m.end(); it++) {
  28.         cout << *it << " ";
  29.     }
  30.    
  31.     return 0;
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement