UVA980 X-Express

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=921 [PDF](https://uva.onlinejudge.org/external/9/p980.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA980/f32b54a4306a49b24581aae8245b84aa288ef4ea.png)

Input Format

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

Output Format

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