UVA12230 过河 Crossing Rivers

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=244&page=show_problem&problem=3382 [PDF](https://uva.onlinejudge.org/external/122/p12230.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12230/b612c63e18559127bd3e854aaaeb5bcd863c134d.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12230/56253f5b6e8906f830ef43cf2037f78e517ddedc.png)

Output Format

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