没时间写题解了,如果你不会这道题可以看一下 https://www.kth.se/social/files/5493dabff2765406ac5c8e75/CatalanEng.pdf 这篇论文,对 permutation pattern 问题进行了系统讨论。