POJ1731解题报告 不重复全排列
来源:互联网 发布:ubuntu安装flash插件 编辑:程序博客网 时间:2024/05/18 04:36
Orders
Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6402 Accepted: 4052
Description
The stores manager has sorted all kinds of goods in an alphabetical order of their labels. All the kinds having labels starting with the same letter are stored in the same warehouse (i.e. in the same building) labelled with this letter. During the day the stores manager receives and books the orders of goods which are to be delivered from the store. Each order requires only one kind of goods. The stores manager processes the requests in the order of their booking.
You know in advance all the orders which will have to be processed by the stores manager today, but you do not know their booking order. Compute all possible ways of the visits of warehouses for the stores manager to settle all the demands piece after piece during the day.
You know in advance all the orders which will have to be processed by the stores manager today, but you do not know their booking order. Compute all possible ways of the visits of warehouses for the stores manager to settle all the demands piece after piece during the day.
Input
Input contains a single line with all labels of the requested goods (in random order). Each kind of goods is represented by the starting letter of its label. Only small letters of the English alphabet are used. The number of orders doesn't exceed 200.
Output
Output will contain all possible orderings in which the stores manager may visit his warehouses. Every warehouse is represented by a single small letter of the English alphabet -- the starting letter of the label of the goods. Each ordering of warehouses is written in the output file only once on a separate line and all the lines containing orderings have to be sorted in an alphabetical order (see the example). No output will exceed 2 megabytes.
Sample Input
bbjd
Sample Output
bbdjbbjdbdbjbdjbbjbdbjdbdbbjdbjbdjbbjbbdjbdbjdbb
题意:输出一个字符串从小到大的全排列,而且不能输出重复的排列。。。
思路:先对字符串中字符排个序,然后以DFS的方式生成全排列,每次在当前递归层取和上次选定的不同的字符,得到的就是所求。。
- POJ1731解题报告 不重复全排列
- poj1731输出不重复全排列
- poj1731 有重复全排列
- poj1731 Orders (全排列)
- POJ1731 串的全排列
- poj1731(dfs实现全排列)
- 全排列不重复
- 全排列问题 解题报告
- 全排列 不重复算法
- poj1731(next_permutation+sort进行全排列)
- POJ1731 Orders【全排列+字符串排序】
- Leetcode # 46. Permutations 全排列 解题报告
- 求不重复数据的全排列
- 不重复数列的全排列
- 【day-6】全排列-不重复
- POJ1731 Orders 全排列(两种方法)
- 有重复元素的排列问题 解题报告
- 如何得到有重复元素的不重复全排列
- 感情其实走不了太远
- header("refresh:2;url=target.php");
- 转载]SA权限九种上传方法
- 调用API函数播放嵌入的MP3文件
- uboot笔记之一:start.s
- POJ1731解题报告 不重复全排列
- 桌面widget,手势快速启动
- 非诚勿扰Ⅱ的一段经典独白
- ural 1028 Stars
- POJ 1088 滑雪
- 开启 Redis 研究及应用之旅
- 从零实现3D图像引擎:(4)三角函数库
- 从C语言观点谈谈内存寻址
- 能上QQ不能上网的解决办法