Skip to content

Instantly share code, notes, and snippets.

@pogin503
Created April 21, 2012 11:36
Show Gist options
  • Save pogin503/2436723 to your computer and use it in GitHub Desktop.
Save pogin503/2436723 to your computer and use it in GitHub Desktop.
#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