UVA11875 Brick Game

Description

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

Input Format

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

Output Format

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