UVA10744 The Optimal Super-Highway

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1685 [PDF](https://uva.onlinejudge.org/external/107/p10744.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10744/037a06fa51e7d4c85b7f071383a3cbacfecacf23.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10744/39bfcd8acbf7fffe19f23ccf61d232b5526be88c.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10744/093392502a153a3921a567a892aeaa711277d155.png)