B. 根据中序遍历和后序遍历重建二叉树

    Type: Default 1000ms 256MiB

根据中序遍历和后序遍历重建二叉树

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

给定一棵二叉树的中序遍历和后序遍历,要求重建这棵二叉树,并输出其前序遍历。

Format

Input

第一行:中序遍历的字符串 第二行:后序遍历的字符串

Output

前序遍历的字符串

Samples

DBEAFC
DEBFCA
ABDECF

Limitation

1s, 1024KiB for each test case.

2.15课后作业

Not Claimed
Status
Done
Problem
4
Open Since
2025-2-16 0:00
Deadline
2025-2-28 23:59
Extension
24 hour(s)