题目链接

记住next_permutation函数的用法,另外string在这里比char[]慢好多啊。。

//#include<bits/stdc++.h>
//using namespace std;
//typedef long long LL;
//
//int main()
//{
//    string s;
//    while(cin>>s)
//    {
//        int l=s.length();
//        sort(s.begin(),s.end());
//        do
//        {
//            cout<<s<<endl;
//        }while(next_permutation(s.begin(),s.end()));
//    }
//}            //437ms  1888KB

#include<bits/stdc++.h>
using namespace std;
typedef long long LL;

int main()
{
    ];
    while(~scanf("%s",s))
    {
        int l=strlen(s);
        sort(s,s+l);
        do
        {
            puts(s);
        }while(next_permutation(s,s+l));
    }
}            //78ms  1872KB

最新文章

  1. WPF阴影效果(DropShadowEffect)
  2. AngularJS 2.0
  3. ios 友盟第三方登录遇到的各种坑。
  4. 【matlab】将matlab中数据输出保存为txt或dat格式
  5. 生成new, old的 shell script
  6. Hashtable,HashMap,Dictionary的区别
  7. GitHub学习资料
  8. c++中的const参数,const变量,const指针,const对象,以及const成员函数
  9. Android相关
  10. 在Mac下显示所有文件
  11. MellPlayer, 基于网易云歌单的命令行播放器
  12. Git时光机穿梭之工作区和暂存区
  13. 执行manage.py syncdb提示Unknown command: &#39;syncdb&#39;
  14. Java DB 访问之(四) spring mvc 组合mybatis
  15. 王家林人工智能AI课程大纲和电子书 - 老师微信13928463918
  16. Gnome osc,资源,,,,,因为官网难下
  17. spring-mybatis-springMVC 整合
  18. Java桌面程序打包成exe可执行文件
  19. Memcached使用与纠错(附代码和相关dll)
  20. .net core中Quartz的使用

热门文章

  1. DOM疑惑点整理(三)
  2. womenzijide2
  3. Jenkins搭建(by tomcat)
  4. 使用debugger在程序中加入断点
  5. 微信小程序的事件
  6. Latex数学公式中的矩阵
  7. 杂项-SAP:SAP (服务访问点(Service Accessing point))
  8. mysql-M-S-S模型 中继器 级联
  9. (appium+python)UI自动化_07_app UI自动化实例【叮咚搜索加车为例】
  10. poj2010 Moo University - Financial Aid 优先队列