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

建议使用的浏览器:

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

5264:pog loves szh I

题目描述
Pog has lots of strings. And he always mixes two equal-length strings. For example, there are two strings: "abcd" and "efgh". After mixing, a new string "aebfcgdh" is coming.

However, szh thinks it is boring, so he reverses the second string, like changing "efgh" to "hgfe". Then mix them as usual, resulting in "ahbgcfde".

Now, here comes a problem. Pog is given a string after mixing by szh, but he wants to find the original two strings.

Hint : In this question, it needs a linefeed at the end of line at hack time.
输入解释
The first line has an integer, $T(1 \leq T \leq 100)$, indicating the number of cases.

Then follows $T$ lines. Every lines has a string S, whose length is even and not more than $100$, and only consists of lower-case characters('a'~'z').
输出解释
For each cases, please output two lines, indicating two original strings.
输入样例
1
aabbca
输出样例
abc
aba

For example, there are two strings: "abcd" and "efgh". After mixing, a new string "aebfcgdh" is coming. 
来自杭电HDUOJ的附加信息
Recommend hujie

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

题目来源 BestCoder Round #43

源链接: HDU-5264

最后修改于 2020-10-25T23:21:10+00:00 由爬虫自动更新

共提交 0

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