1 #include "stdafx.h"
2 #include<algorithm>
3 #include <string>
4 #include <iostream>
5 using namespace std;
6
7 void print_arrange(string s)
8 {
9 sort(s.begin(),s.end());
10 do
11 {
12 cout<<s<<endl;
13 } while (next_permutation(s.begin(),s.end()));
14 }
15
16 int _tmain(int argc, _TCHAR* argv[])
17 {
18 string s;
19 cin>>s;
20 print_arrange(s);
21 return 0;
22 }
敏于事,慎于言