UVA12099 书架 The Bookcase

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=242&page=show_problem&problem=3251 [PDF](https://uva.onlinejudge.org/external/120/p12099.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12099/ee0851ffa7e62c4ec96c220f08d00f8736e21958.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12099/3d47314d3f67cde662f48eea6818e41110f7d9eb.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12099/4f7209be687892141cda99217b24f2fd60a4bcc6.png)