UVA11573 Ocean Currents

Description

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

Input Format

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

Output Format

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