UVA591 Box of Bricks

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=532 [PDF](https://uva.onlinejudge.org/external/5/p591.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA591/f7b8dd90dc038ee9624031cf8f77315874bc7b4b.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA591/6a9c43e4255f3b947a68c5cff360e787852c681e.png)

Output Format

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