UVA747 Grid Soccer

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=688 [PDF](https://uva.onlinejudge.org/external/7/p747.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA747/658c303bcdb666c31f329d870e9be5894711bc9d.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA747/767d879249958e6e71c232c8ee6ed0b11c0a5e4b.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA747/6cac969a8f33575277dc00c124785a73f399ea13.png)