当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

7125:Master of Shuangpin

题目描述
As you know, there are three kinds of Chinese input methods commonly used: Wubi, Pinyin and Shuangpin. With Shuangpin, you can type any Chinese word by pressing keys only twice.



Attention that:

1: For pinyin of length 1, you should repeat it in order to meet the conditions.
2: For those of length 2, just output the original pinyin.
3: For pinyin such as ang, you should press the first character of it and then look up this whole pinyin in the table for the second key.
4: For simplification, there is no character v in any input. We believe that you, a Pinyin master, can tell u and v in any situations such as lve and que, so we do not challenge you here.


OK, now you are already a MASTER of Shuangpin! Please output the keys sequence to type the given sentences. For example, "ni hao shi jie" will be "ni hc ui jp".
输入解释
There are multiple test cases. Each line contains one.

Each line is a sequence of pinyin separated by spaces.

It is guaranteed that the number of test case is no more than 1000, the number of pinyin in one test case is no more than 500, and the number of pinyin in all the test cases is no more than 5000.
输出解释
The keys sequence separated by spaces.
输入样例
rua
ni xian qi po lan
rang wo men dang qi shuang jiang
cha na zhua zhu le wei lai
zhe ti mian shen me wan yi
ni you ben shi na lai mai a
wo e le wo men chi shen me
ang yang de dou zhi
输出样例
rx
ni xm qi po lj
rh wo mf dh qi ul jl
ia na vx vu le ww ld
ve ti mm uf me wj yi
ni yz bf ui na ld md aa
wo ee le wo mf ii uf me
ah yh de dz vi

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-7125

最后修改于 2021-10-23T19:11:35+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 262144/262144K(Java/Others)