nnn 个点的树,每个点有一个颜色 ci(ci≤k)c_i(c_i\leq k)ci(ci≤k)。
求经过所有颜色的树上简单路径数量。
当前已知能做到 nlogn×2k2n\log n \times 2^{k\over 2}nlogn×22k
请问有没有低于 n2n^2n2 的多项式复杂度做法。