UVA11587 Brick Game

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2634 [PDF](https://uva.onlinejudge.org/external/115/p11587.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11587/d1ca01ca3446e7659c56134ffa361a854f9d5c05.png)

Input Format

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

Output Format

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