Orders(STL)
来源:互联网 发布:ubuntu jira部署 编辑:程序博客网 时间:2024/06/06 06:32
OrdersCrawling in process...Crawling failedTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
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
STL函数。
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;int main(){ char str[210]; int len; while(~scanf("%s",str)) { len=strlen(str); sort(str,str+len); puts(str); while(next_permutation(str,str+len)) { puts(str); } } return 0;}
0 0
- Orders(STL)
- poj 1731 Orders(STL)
- Orders(C++ stl next_permutation)
- POJ 1731 Orders(STL运用)
- POJ 1731 Orders 【STL】
- 复习--C - Orders(字符串全排序,stl函数)
- POJ 1731---orders【STL标准模板库】
- Orders
- Orders
- Orders
- Orders
- POJ 1731 Orders STL 中string的应用
- A - Following Orders(11.3.1))
- poj 1731 Orders(字典树)
- POJ 1731 Orders(全排列)
- POJ 1270 Following Orders(拓扑排序)
- poj1270Following Orders(拓扑排序+dfs回溯)
- POJ 1731 Orders(全排列)
- Qt之中文显示(QMessageBox、QLineEdit右键菜单等)
- [ACM] POJ 2154 Color (Polya计数优化,欧拉函数)
- JavaScript演示日期(Date)
- 有上下界的网络流
- 383a
- Orders(STL)
- 2.、动态函数调用实现下列操作,输入2个数以及操作符计算结果。 @ 求最大公约数 $求最小公倍数 - 求差 + 求和 等等
- VB中的作用域问题和生命周期
- 384b
- Esper事件处理引擎_2_Map 数据结构处理
- FATE(二维多重背包)
- C. Hamburgers
- MVC-强类型模型与@model关键字
- Native App