UVA13076 The traveller squirrel

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=866&page=show_problem&problem=4974 [PDF](https://uva.onlinejudge.org/external/130/p13076.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13076/d8199528deb0759ff8f54ef1153c7694aa1c1478.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13076/5f08c2bed5cd1883c7482a3da0676ef5c13cd4d3.png)

Output Format

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