随笔分类 - 动规-树形DP
摘要:题目链接:https://vjudge.net/problem/UVA-1220 思路: 树形DP模板题,求最大人数很简单,难点在于如何判断最大人数的名单是否有不同的情况; 解决方法是用一个数组f[manx][2]记录该节点是否出场的情况,为真时代表有多种情况; 具体讨论: Code:
阅读全文
摘要:Problem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical st
阅读全文