Monday 4 May 2009

POJ 1731


#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main() {
char str[256];
int len;
cin>>str;
len=strlen(str);
sort(str,str+len);
do cout<<str<<endl; while (next_permutation(str,str+len));
return 0;
}

No comments:

Post a Comment