UVA676 Horse Step Maze

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=617 [PDF](https://uva.onlinejudge.org/external/6/p676.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA676/1cb90e116818e1663bc5adb3223daa34150c04d5.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA676/39a313b04fc5e030933f079a92a11a6ebc2773ae.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA676/3037d17a73c870e6f986dbc2148f4b3aaf3d65ac.png)