UVA10147 Highways

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1088 [PDF](https://uva.onlinejudge.org/external/101/p10147.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10147/4a32494239b54e4ec13e759f9c301ae8d619794d.png)

Input Format

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

Output Format

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