Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <climits>
- #include <set>
- #include <string>
- #include <vector>
- #include <sstream>
- #include <list>
- #include <algorithm>
- using namespace std;
- int main()
- {
- string buffer;
- getline(cin, buffer);
- istringstream istr(buffer);
- double dbl;
- set<double, greater<double> > occurrences;
- while(istr >> dbl)
- occurrences.insert(dbl);
- size_t count = 3;
- for(auto item : occurrences)
- {
- cout << item << ' ';
- count--;
- if(!count)
- break;
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement