Castles

题意翻译

给定 $n$ 个节点的树,每个节点上有三个权值 $a,b,c$,你初始时有一个量 $x$,要求每访问到一个节点都满足 $x \ge a$ ,之后将 $x$ 的值减去 $b+c$,求:若要能够对整棵树进行访问,$x$ 的最小值。 $n \le 100, a,b,c \le 1000$

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=245&page=show_problem&problem=3534 [PDF](https://uva.onlinejudge.org/external/10/p1093.pdf)

输入输出格式

输入格式


输出格式


输入输出样例

暂无测试点