LGP2767题解

题面有点儿毒,每个位置的子树可以是空的。。。

设答案的生成函数为 \(F(x)\),答案即 \([x^n]F(x)\)

\[F(x)=x\times(F(x)+1)^m \]

设有 \(F(G(x))=x\),那么:

\[F(G(x))=G(x)(F(G(x))+1)^m \]

\[x=G(x)(1+x)^m \]

\[G(x)=\frac{x}{(1+x)^m} \]

根据拉反有:

\[[x^n]F(x)=\frac{1}{n}[x^{n-1}](1+x)^{nm} \]

答案是:

\[\frac{\binom{nm}{n-1}}{n} \]

posted @ 2022-07-09 11:35  Prean  阅读(17)  评论(0编辑  收藏  举报
var canShowAdsense=function(){return !!0};