UVA12710 Game of MJ

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4448 [PDF](https://uva.onlinejudge.org/external/127/p12710.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12710/f880e0080a494cdf5ad481d27e20c06d46b7b016.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12710/64a508a2cfcc392e2d69c3e7efbe1ab6dacca7c6.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12710/4afdd4622ccc57836ca3890d7e612e6de8ab9611.png)