UVA11305 Chess on Planet X

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=2280 [PDF](https://uva.onlinejudge.org/external/113/p11305.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11305/e808c3efe82ca05cf9957beac36ee632ec64bb8f.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11305/9493a3d4aa2ec1f75c3a75ef6b6c46308cd0bdb0.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11305/5ebdb90f4c76bf3f0575ca1b415abe43b5a8d1e9.png)