1. 程式人生 > >全排列函數

全排列函數

space ext int ostream per ret namespace string mut

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;

int main()
{
string str;
cin>>str;
sort(str.begin(), str.end());
do {
cout<<str<<endl;
} while(next_permutation(str.begin(), str.end()));
return 0;
}

全排列函數