UVA10639 Square Puzzle

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=18&page=show_problem&problem=1580 [PDF](https://uva.onlinejudge.org/external/106/p10639.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10639/74674df3bd840ddb8f10be08c1ef15748d0a2bcd.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10639/499b5cd638f0efae608f1a8a61e8e5faef3247d3.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10639/41852677ece208d9710da544c4d8f702e0f158c2.png)