摘要:
1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen 阅读全文
摘要:
原题链接 很久没做dp了,连一道裸地区间dp都没能第一时间想到,我可真是个臭弟弟...... 一开始是用的贪心吧,wa了一发。 本题思路:区间dp的一般思路,先枚举区间长度,然后枚举区间头,然后枚举区间断点,很容易就能想到状态转移方程。 自己关掉博客好好想想吧,区间dp应该是最简单的dp类型了。 # 阅读全文