UVA394 Mapmaker

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=5&page=show_problem&problem=330 [PDF](https://uva.onlinejudge.org/external/3/p394.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA394/29ea4406359dbd80511a339c4b0852b73bf33243.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA394/94beb5650ba174ddea617bded0914a21b86a08b1.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA394/187869c69b5ff75f457a2ed9a11a57a623760b3f.png)