Problem1407--类的练习(STL)--map的应用

1407: 类的练习(STL)--map的应用

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 3  Solved: 1
[Submit] [Status] [Web Board] [Creator:]

Description

输入的字符串,把每个单词全部转化成小写字母,对每个单词,看它的字母重排后得到的单词在所有输入的单词中是否出现过,若没有出现,就输出原单词。所有要输出的单词按字典序排列输出。
思路:构造小写化函数,set可以解决去重和排序问题,用map建立string与int的映射
void string stand_words(string s1);
注意要存储原单词!


Sample Input

Resizes the string content to characters.
the content is expanded by appending as many instances of the characters as 
needed to reach a size of characters.

Sample Output

resizes
a
appending
by
expanded
instances
is
many
needed
reach
size
string

Source/Category

 

[Submit] [Status]