UVA13287 Shattered Cake

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5211 [PDF](https://uva.onlinejudge.org/external/132/p13287.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13287/8c854a3f46375071cef8e980c973885ce901e498.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13287/722da1b2570b3f4e73cffb2d91b2d657801c6f2d.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13287/0989d4901761220c34e6217c6d7a391048f204fe.png)