UVA10047 The Monocycle

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=988 [PDF](https://uva.onlinejudge.org/external/100/p10047.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10047/4f1a1c899c199e9d2d5bcc0f16e6dc6b9be97712.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10047/5f0b19a30deebacbcc3003a668cd4b206c7275d3.png)

Output Format

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