fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. #include <map>
  5. using namespace std;
  6.  
  7. int main() {
  8. map<char, int> mapa;
  9. string str;
  10. cin >> str;
  11. for (const auto& chr : str)
  12. {
  13. mapa[chr] += 1;
  14. }
  15.  
  16. for (const auto& kv : mapa)
  17. {
  18. cout << kv.first;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 15240KB
stdin
mamky_tvoy_ebal
stdout
_abeklmotvy