UVA998 Dendogram

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=939 [PDF](https://uva.onlinejudge.org/external/9/p998.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA998/d024d955be4bcb796f7c253f9a3670898c3681e8.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA998/976b3d7776f8ed27c8df4a7046ebed3c59d77830.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA998/ae3caa940c307fc01a3e0d686ddd7a287208724d.png)