随笔 - 90,  文章 - 4,  评论 - 34,  阅读 - 11万

好多天以前碰到的,当时懒得写博客,今天没事,记录下吧。

复制代码
 1 #include <algorithm>
 2 #include <iostream>
 3 #include <cstring>
 4 #include <cstdio>
 5 using namespace std;
 6 const int N=101;
 7 char s[N];
 8 int main()
 9 {
10     int len;
11     gets(s);
12     len=strlen(s);
13     sort(s,s+len);
14     puts(s);
15     while(next_permutation(s,s+len))
16     {
17         puts(s);
18     }
19     return 0;
20 }
复制代码

posted on   pony1993  阅读(155)  评论(0编辑  收藏  举报

< 2012年9月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6
Statcounter View My Stats
点击右上角即可分享
微信分享提示