UVA11359 Guards, Imbecile Guards

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11359/916d797fb45dc5444baf64bc60f6191df0bd7950.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11359/9b4dfec4d438de9e1603398d9d030b88847af72c.png)