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

 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 }

相关文章:

  • 2021-08-30
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2021-09-22
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2021-05-11
  • 2021-11-05
相关资源
相似解决方案