UVA11538 Chess Queen

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2533 [PDF](https://uva.onlinejudge.org/external/115/p11538.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11538/3d0676424e25ee4d01bff01dfc925aa3f1e01215.png)

Input Format

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

Output Format

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