Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <set>
- using namespace std;
- int main() {
- multiset<int> ms;
- ms.insert(5);
- ms.insert(2);
- ms.insert(1);
- ms.insert(6);
- int najmal_element = *ms.begin();
- int najgolem_element = *ms.rbegin();
- cout << najmal_element << " " << najgolem_element << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement