UVA10111 Find the Winning Move

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10111/9055d46ebcb6e4c4c06061fdb646c962c6876665.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10111/2157b9dc71543030f751fb8a407ef6974e47cc6d.png)