UVA12530 Game of Tiles

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=441&page=show_problem&problem=3975 [PDF](https://uva.onlinejudge.org/external/125/p12530.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12530/e2d0ceecc39aff1ca5eea06bc0b61a20947a45d5.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12530/755b56b25ed17a6b98f33ec16273e0066b968703.png)