#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. Repost: Set Delivery Block on SO

    If SO is incomplete, then automatically set the delivery block on the SO header. as suggested by ear ...

  2. php下载文件,添加响应头

    //下载,添加响应头信息 header('Content-type:application/octet-stream'); header('Content-Disposition:attachment ...

  3. 《自动共享LDAP用户并且访问其家目录》RHEL6

    实验的目的: 实现ldap服务器上的ldap用户被客户端访问,自动挂载到客户端,并且可以访问ldap用户的家目录. 服务端: 1.只需要配置文件: Iptables –F       关闭selinu ...

  4. MySQL 性能优化

    内容简介:这是一篇关于mysql 性能,mysql性能优化,mysql 性能优化的文章.网上有不少mysql 性能优化方案,不过,mysql的优化同sql server相比,更为麻烦与负责,同样的设置 ...

  5. jQuery 遍历用法

    jQuery 遍历 DOM 树 parent() 方法返回被选元素的直接父元素(找爸爸). parents() 方法返回被选元素的所有祖先元素,它一路向上直到文档的根元素 (找长辈). parents ...

  6. 生动有趣的动画Toast--第三方开源--NiftyNotification

    NiftyNotification在github上的项目主页是:https://github.com/sd6352051/NiftyNotificationNiftyNotification本身又依赖 ...

  7. openerp模块收藏 auto_setup 自动帮你完成建新库时必做几个操作(转载)

    auto_setup 自动帮你完成建新库时必做几个操作 原文:http://shine-it.net/index.php/topic,6777.0.html 模块地址: https://github. ...

  8. Linux使用标准IO的调用函数,分3种形式实现

    /*根据cp命令的格式要求,设计一个类cp的功能程序,要求使用标准IO的调用函数,分3种形式实现,字符,行,块.并注意函数功能的分层*/ #include<stdio.h> #includ ...

  9. 表达式语言之ongl表达式

    OGNL的全称是Object Graph Navigation Language(对象图导航语言),它是一种强大的表达式语言,让你通过简单一致的表达式语法来读取和设置Java对象的属性值,调用对象的方 ...

  10. MYSQL-给带特殊符号的数据库创建用户名

    MYSQL-创建数据库及用户名: mysql> create database yoon;Query OK, 1 row affected (0.00 sec) mysql> grant ...