UVA12729 Squares Game

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4581 [PDF](https://uva.onlinejudge.org/external/127/p12729.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12729/a1072888ec300b32869c3d83f9a35d0290be3cf4.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12729/740befd81053de5ba4089679217eab2df35c733e.png)

Output Format

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