数据:
in : 3 -2 -3 5 5 1 2 1 3 out: 0 solution is unique
被 hack 的题解输出
0 solution is not unique
原因:当根结点的所有子树最大收益均为 000,最优方案为呆在根结点不动,方式唯一。
被 hack 的题解链接:
第六篇