UVA685 Least Path Cost

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=626 [PDF](https://uva.onlinejudge.org/external/6/p685.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA685/839d4957feaa07261acc5147c73265c8a4226619.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA685/801394c3ac3059f7b3018b0604904a5a91e29811.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA685/08cf998f9bdc0d63824146666d1f44ea7dcc0085.png)