C++ :
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int main() { char s[7]; while(scanf("%s",s)!=EOF) { do { puts(s); }while(next_permutation(s,s+strlen(s))); puts(""); } return 0; }
使用您的 www.mathcoding.online 通用账户