UVA687 Lattice Practices

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=628 [PDF](https://uva.onlinejudge.org/external/6/p687.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA687/b215efaf32275487fe877ad53e492220355aef21.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA687/94ee1dd589d973b852810f70eb35e149a1a2215d.png)