UVA12663 High bridge, low bridge

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=602&page=show_problem&problem=4401 [PDF](https://uva.onlinejudge.org/external/126/p12663.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12663/08a81f80f4903ae37efeda54668d9032db16140a.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12663/119cd1afd7d76f6977f4d7848017ad6c6cf32117.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12663/3f3210966800e2145f03a07e6f4c84fe96090fa8.png)