UVA152 Tree's a Crowd

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=88 [PDF](https://uva.onlinejudge.org/external/1/p152.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA152/8a0c4dcedb809f4063d5557143109c9008b4d3bb.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA152/8b9eb1557ae72f6421f5534261765e73a79a17ab.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA152/8eaad4fb6f4100e1a0c5dc557fa980d718f4d857.png)