UVA12483 Toboggan of Marbles

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=279&page=show_problem&problem=3927 [PDF](https://uva.onlinejudge.org/external/124/p12483.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12483/3b8fa6fb3137dd9ea7e72cb13de349eb8bf2de65.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12483/3627330439a329a97432c027f412213081b2eee2.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12483/48723f3610adbc899e35c4edd711ede673489c94.png)