Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <utility>
- #include<map>
- #include <sstream>
- using namespace std;
- int main()
- {
- string str;
- getline(cin, str);
- istringstream istr(str);
- map<double, size_t> doubles;
- double d;
- while (istr >> d)
- {
- doubles[d]++;
- }
- for (pair<double, size_t> cur : doubles)
- cout << cur.first << " -> " << cur.second << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement