UVA12295 Optimal Symmetric Paths

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=244&page=show_problem&problem=3716 [PDF](https://uva.onlinejudge.org/external/122/p12295.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12295/7809bb9a17b3a5db21f5aee9f67a8c0050828247.png)

Input Format

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

Output Format

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