Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <set>
- using namespace std;
- int main() {
- multiset<int> ms;
- ms.insert(5);
- ms.insert(1);
- ms.insert(3);
- ms.insert(4);
- ms.insert(7);
- ms.insert(9);
- ms.insert(5);
- for(int x: ms) {
- cout << x << " ";
- }
- cout << endl;
- for(multiset<int>::iterator it = ms.begin(); it != ms.end(); it++) {
- cout << *it << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment