A. 根据前序遍历和中序遍历重建二叉树

    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

ABDECF
DBEAFC
DEBFCA

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)