Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <algorithm>
  2. #include <string>
  3. #include <iostream>
  4.  
  5. int main()
  6. {
  7. std::string s;
  8. std::cin >> s;
  9. std::sort(s.begin(), s.end());
  10. do {
  11. std::cout << s << 'n';
  12. } while(std::next_permutation(s.begin(), s.end()));
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement