UVA278 Chess

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=214 [PDF](https://uva.onlinejudge.org/external/2/p278.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA278/f1f4f04fef4d4fa936fa3b861c582b497aeffbf6.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA278/2b14ec55932c169668636707d66593eb29d3d4e0.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA278/722ddd8c5ba1713b91d6657de5e69e93944b4875.png)