UVA11693 Speedy Escape

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2740 [PDF](https://uva.onlinejudge.org/external/116/p11693.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11693/9786fe578bcfc55d223a0cc4d93d527bf0102c94.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11693/8bb4bdee50840e941e2f0f3cc8e87f2cad2ca0f5.png)

Output Format

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