UVA11823 Two Longest Paths

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2923 [PDF](https://uva.onlinejudge.org/external/118/p11823.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11823/b1404c09287e621dc26813ecdf51085259966ceb.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11823/7bb0d23c8c4e2d6aa69478d7d15028ac4b852ee3.png)

Output Format

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