anda522 / anda522.github.io

https://wyqz.top
3 stars 0 forks source link

树上拓扑序计数|树形DP | 行码棋 #39

Open anda522 opened 1 year ago

anda522 commented 1 year ago

https://wyqz.top/p/2852940489.html

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