Open anda522 opened 1 year ago
https://wyqz.top/p/2852940489.html
树上拓扑序计数|树形DPhttps://ac.nowcoder.com/acm/contest/38630/F 思路每个公司是一棵树,然后每个公司可以看做连在一个虚拟的根上。每个公司的计算方案实际上就是计算这棵树的拓扑序的个数。用树形DP求
https://wyqz.top/p/2852940489.html
树上拓扑序计数|树形DPhttps://ac.nowcoder.com/acm/contest/38630/F 思路每个公司是一棵树,然后每个公司可以看做连在一个虚拟的根上。每个公司的计算方案实际上就是计算这棵树的拓扑序的个数。用树形DP求