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