Created
April 21, 2012 11:36
-
-
Save pogin503/2436723 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <set> | |
#include <iostream> | |
int main(){ | |
std::set<int> hills; | |
for(int ii = 0; ii < 10; ii++){ | |
int temp; | |
std::cin >> temp; | |
hills.insert(temp); | |
} | |
std::set<int>::reverse_iterator it = hills.rbegin(); | |
for(int ii = 0; ii < 3; ii++){ | |
std::cout << *it++ << std::endl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment