Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <string>
- #include <iostream>
- int main()
- {
- std::string s;
- std::cin >> s;
- std::sort(s.begin(), s.end());
- do {
- std::cout << s << 'n';
- } while(std::next_permutation(s.begin(), s.end()));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement