UVA12144 Almost Shortest Path

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=243&page=show_problem&problem=3296 [PDF](https://uva.onlinejudge.org/external/121/p12144.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12144/f03f63569e95524eb27f5dd0cb65b1b23adff481.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12144/23253d804f809d18866e65a9772dd494893f8110.png)