UVA366 Cutting Up

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=5&page=show_problem&problem=302 [PDF](https://uva.onlinejudge.org/external/3/p366.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA366/60d78aa067becca7c99382a57f75419d95cc447f.png)

Input Format

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

Output Format

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