RYIP在线题库
首 页   >   习题练习   >   提交
Problem1840--新二叉树

1840: 新二叉树

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

【 Description 】

输入一串二叉树,用先序遍历的格式输出。

【 Input 】

第一行为二叉树的节点n(n<=26),后面n行,每一个字母为节点,后两个字母为左右孩子,空节点用*表示。

【 Output 】

先序排列的二叉树

【 Sample Input 】

6
abc
bdi
cj*
d**
i**
j**

【 Sample Output 】

abdicj

【 Source/Category 】