#include<iostream>
#include<string>
#include<algorithm>
using namespace std; int main()
{
int NUM;
string list;
cin>>list,NUM = list.length(),sort(&list[],&list[]+NUM),cout<<list<<endl;
while(next_permutation(&list[],&list[]+NUM))cout<<list<<endl;
}

关注我的公众号,当然,如果你对Java, Scala, Python等技术经验,以及编程日记,感兴趣的话。

技术网站地址: vmfor.com

POJ 1731的更多相关文章

  1. POJ 1731 Orders(STL运用)

    题目地址:POJ 1731 这题能够直接用STL函数做,非常轻松..next_permutation函数非常给力.. 代码例如以下: #include <algorithm> #inclu ...

  2. poj 1731 Orders

    http://poj.org/problem?id=1731 Orders Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 9 ...

  3. poj 1731 Orders(暴力)

    题目链接:http://poj.org/problem?id=1731 思路分析:含有重复元素的全排列问题:元素个数为200个,采用暴力枚举法. 代码如下: #include <iostream ...

  4. Orders POJ - 1731

    The stores manager has sorted all kinds of goods in an alphabetical order of their labels. All the k ...

  5. POJ 1731:Orders

    Orders Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 9940   Accepted: 6048 Descriptio ...

  6. 是时候学一波STL了。。。

    都到如今了还不会STL,赶紧学习一下. .. 头文件#include<algorithm> 加上 using namespace std. 求下一个排列的函数:next_permutati ...

  7. POJ 题目分类(转载)

    Log 2016-3-21 网上找的POJ分类,来源已经不清楚了.百度能百度到一大把.贴一份在博客上,鞭策自己刷题,不能偷懒!! 初期: 一.基本算法: (1)枚举. (poj1753,poj2965 ...

  8. (转)POJ题目分类

    初期:一.基本算法:     (1)枚举. (poj1753,poj2965)     (2)贪心(poj1328,poj2109,poj2586)     (3)递归和分治法.     (4)递推. ...

  9. poj分类

    初期: 一.基本算法:      (1)枚举. (poj1753,poj2965)      (2)贪心(poj1328,poj2109,poj2586)      (3)递归和分治法.      ( ...

随机推荐

  1. 杭电ACM2057--A + B Again

    这是题目 A + B Again 这是源代码: #include <stdio.h> int main() { __int64 a,b; while (scanf("%I64X ...

  2. C++中extern “C”含义深层探索

    C++中extern “C”含义深层探索 extern “C” 是一个双向都需要用到的语法表示,就是说在cpp引用c头文件,或者c引用cpp文件时都需要用到.但extern “C” 永远只能在cpp引 ...

  3. 理解 pkg-config 工具

    引用了别人的文章:http://www.chenjunlu.com/2011/03/understanding-pkg-config-tool/ 你在 Unix 或 Linux 下开发过软件吗?写完一 ...

  4. JPA SQL 的复杂查询createNamedQuery

    @NamedNativeQueries({ @NamedNativeQuery( name = "getNativeNutShellInfo", //需要调用的name query ...

  5. Unity学习笔记(4):依赖注入

    Unity具体实现依赖注入包含构造函数注入.属性注入.方法注入,所谓注入相当赋值,下面一个一个来介绍 1:构造函数注入 1.1当类有多个构造函数时,可以通过InjectionConstructor特性 ...

  6. 转换 Html 内容为纯文本内容(html,文本互转)

    转自http://www.cnblogs.com/jyshi/archive/2011/08/09/2132762.html : /// <summary> /// 转换纯文本内容为 HT ...

  7. Oracle RAC Failover

    Oracle  RAC 同时具备HA(High Availiablity) 和LB(LoadBalance). 而其高可用性的基础就是Failover(故障转移). 它指集群中任何一个节点的故障都不会 ...

  8. 《深入浅出WPF》重点摘要(—)Binding自动通知机制

    最近因为公司的项目需要用WPF开发,就学习了一下WPF.刚开始只是用到什么就百度什么,虽然功能是实现了,但还是没有弄清楚原理(如果不弄清原理,会感觉很心虚,整个人会没底气),所以决定找个教程系统地学一 ...

  9. Tmall Programmer Triples Smartisan Sales

    页面程序造假,丢脸丢到华尔街日报去咯 http://blogs.wsj.com/chinarealtime/2014/10/13/tmall-programmer-triples-smartisan- ...

  10. Jquer Ajax xmlhttp请求成功了,为什么一直在error函数里面

    转载自http://www.cnblogs.com/sky_Great/archive/2013/01/18/2866861.html 并进行整理: 今天遇到了一个极其奇怪的问题,用各种工具检查都能看 ...