UVA919 Cutting Polyominoes

Description

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

Input Format

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

Output Format

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