[codeforces438E]The Child and Binary Tree 试题描述 Our child likes computer science very much, especially he likes binary trees. Consider the sequence of n distinct positive integers: \(c_1, c_2, \cdots , c_n\). The child calls a vertex-weighted rooted b…
CF438E The Child and Binary Tree Description 给一个大小为\(n\)的序列\(C\),保证\(C\)中每个元素各不相同,现在你要统计点权全在\(C\)中,且点权和为\(m\)的二叉树个数,并对\(998244353\)取模. \(n,m \le 10^5\) Solution \(998244353\)?这很多项式...... 总之先颓柿子好了. 令\(f_n\)表示权值和为\(n\)的二叉树个数,\(g_n\)表示权值\(n\)是否出现在\(C\)中…