UVA955 Interpreting Old Maps

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA955/37086e9563136d0c26b52f3e042d9008b37a3939.png)

Output Format

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