UVA11214 守卫键盘 Guarding the Chessboard

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2155 [PDF](https://uva.onlinejudge.org/external/112/p11214.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11214/b944da1eec66e12583384f5364ec48727533152a.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11214/8c120f1a504f35395db88fd3955c4ce2bf076acf.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11214/009a0b1494af956275aeea5844527ab58e8de10e.png)