联发科编程大赛_第二题情报破译

来源:互联网 发布:淘宝卖什么容易赚钱 编辑:程序博客网 时间:2024/06/05 03:19

情报破译

我方截获敌方一份文档execute.stdin,发现敌方为了防止泄密,句子单词顺序被翻转了。

例如,“office. post the attack morning, tomorrow Act”,原文应该是“Acttomorrow morning, attack the post office.”

组织需要你的时候到了,请你用程序把文档破译出来。

 

【输入说明】

在程序当前路径下存在文本文件execute.stdin,程序从execute.stdin中读取输入数据。

注意:

1. 一行的字符总数不会超过50000个。

2. 单词总数不会超过600,每个单词的长度也不会超过30。

3. 标点符号当作普通字母一样处理。

4. 有时候两个单词中间可能会有很多空格。

 

【输出说明]

输出破译之后的文件内容。

 

【样例】

execute.stdin文件内容:

company. design IC famous a is MediaTek

work? to here come to opportunity the wantyou Do

 

输出解密之后的内容:

MediaTek is a famous IC design company.

Do you want the opportunity to come here towork?


解题代码: