UVA11607 Cutting Cakes

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2654 [PDF](https://uva.onlinejudge.org/external/116/p11607.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11607/8e39d4f56bbcadbc9dc4c7d051b1a26ea1b7c692.png)

Input Format

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

Output Format

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