13006 - 最长单词
时间限制 : 1 秒
内存限制 : 128 MB
一般而言一个单词由字母a − z、A − Z 组成,但可能包含一个或多个连字符(-)。给定一个包含单词和其他字符(标点符号、数字、符号等) 的文本,请编写一个程序来查找该文本中最长的单词。
比如:
单词ROBOYoung 的长度是9
单词ROBO-Young的长度是10
单词RO-BO-Young的长度是11
输入
一个长度不超过10000 的文本,文本中单词的长度不超过100,文本以E-N-D结束。
输出
以小写字母形式打印出最长的单词。如果存在多个最长的单词,则打印第一个最长单词。
样例
输入
ACM International Collegiate Programming Contest (abbreviated as ACM-ICPC or just ICPC) is an annual multi-tiered computer programming competition among the universities of the world. The contest is sponsored by IBM. Headquartered at Baylor University, with autonomous regions on six continents, the ICPC is directed by Baylor Professor William B. Poucher, Executive Director, and operates under the auspices of the Association for Computing Machinery (ACM). The 2012 ACM-ICPC Asia Hatyai Regional Programming Contest is held during 15-16 November 2012. It is hosted by Prince of Songkla University, Hatyai campus. E-N-D
输出
international