摘要:
Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. Input Specification: Each input file contains one t 阅读全文
posted @ 2020-06-16 12:19
yuer!
阅读(215)
评论(0)
推荐(0)
摘要:
给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。 例如图1给出的两棵树就是同构的,因为我们把其中一棵树的结点A、B、G的左右孩子互换后,就得到另外一棵树。 而图2就不是同构的。 图1 图2 现给定两棵树,请你判断它们是否是同构的。 输入格式: 输入给出 阅读全文
posted @ 2020-06-16 00:39
yuer!
阅读(247)
评论(0)
推荐(0)

浙公网安备 33010602011771号