Advertisement
Josif_tepe

Untitled

Mar 25th, 2022
1,025
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int main()
  5. {
  6.     string s;
  7.     cin >> s;
  8.    
  9.     sort(s.begin(), s.end());
  10.    
  11.     do {
  12.         cout << s << endl;
  13.        
  14.     } while(next_permutation(s.begin(), s.end()));
  15.  
  16.     return 0;
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement