UVA11318 Marble Game

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=2293 [PDF](https://uva.onlinejudge.org/external/113/p11318.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11318/5e9d821c1618aa183ff1b69bc0189cf4906f0014.png)

Input Format

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

Output Format

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