UVA12525 Boxes and Stones

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12525/8175b9403f88a570ff0d592dc6aa404385789e96.png)

Output Format

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