英语翻译DescriptionThe 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
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 15:54:20
英语翻译DescriptionThe 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
英语翻译
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.
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
bbdj
bbjd
bdbj
bdjb
bjbd
bjdb
dbbj
dbjb
djbb
jbbd
jbdb
jdbb
和输入输出格式就行~
英语翻译DescriptionThe 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
说明
这些商店经理以标在标签的字母顺序排列各种商品.所有的种类有标签以同一个字母开头的存储在同一个仓库,此信标(即在同一建筑物).白天收到的商店经理和书籍的货物将被从商店交付的订单.每个订单只需要一个商品的.商店经理进程在其预定的顺序要求.
你事先知道所有的订单,将要由今天的商店经理处理,但你不知道他们的预约订单.计算出的为商店经理处理后,白天一块一块的所有要求仓库的访问一切可能的方式.
输入
输入包含一个与所要求的所有货物标签(排名不分先后)一行.每一种商品所代表的信,其标签开始.英文字母只有小写字母被使用.订单的人数不超过200人.
输出
输出将包含所有可能的排序中,商店经理可以访问他的仓库.每个仓库是由一个单一小信的英文字母 - 该货物的标签开始的信.每个仓库顺序写在输出文件中只有一次在一个单独的行和所有的行序都必须包含在一个字母顺序排列(见示例).没有一个输出超过2兆字节.
采样输入
bbdj
bbjd
bdbj
bdjb
bjbd
bjdb
dbbj
dbjb
djbb
jbbd
jbdb
jdbb