UVA13107 Royale With Cheese

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=871&page=show_problem&problem=5018 [PDF](https://uva.onlinejudge.org/external/131/p13107.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13107/e358aac248ea3bd409eff1e1079640466bcc96cf.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13107/7be27bf3cb306b8d16fcdb15b41695c99f18f0cf.png)

Output Format

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