UVA12987 Ancient Go

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4870 [PDF](https://uva.onlinejudge.org/external/129/p12987.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12987/90eca5951fbd373836539df06b7e40a1b80fc6c7.png)

Input Format

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

Output Format

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