Learn a dynamic programming approach to optimize guest lists in hierarchical companies by maximizing total fun ratings while respecting constraints.