UVA11868 Game of Blocks

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2979 [PDF](https://uva.onlinejudge.org/external/118/p11868.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11868/c7d7425c2a82a6331069dcab6fdb71a9c6c76400.png)

Input Format

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

Output Format

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