UVA12405 Scarecrow

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=279&page=show_problem&problem=3836 [PDF](https://uva.onlinejudge.org/external/124/p12405.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12405/924c82f83ebb9f3630ba58ebe3c095b371885f4c.png)

Input Format

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

Output Format

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