UVA12391 Game, Set and Match

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=278&page=show_problem&problem=3813 [PDF](https://uva.onlinejudge.org/external/123/p12391.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12391/a9e2f2ab737c5499e37211012359cca256e76983.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12391/7e0e3adc29a6dcb93f0ddabfa2295a204f5834d8.png)