UVA10165 Stone Game

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1106 [PDF](https://uva.onlinejudge.org/external/101/p10165.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10165/d4546d0cf35d6187bfa9c2d32b06a4f140e8b7b0.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10165/8316cfc0f68283f0975e48f58c7a79e92421e3a0.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10165/8691d36fd743e9519cacd8ac66a9bb364d980599.png)