UVA13071 Double decker

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=866&page=show_problem&problem=4969 [PDF](https://uva.onlinejudge.org/external/130/p13071.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13071/4911f5763d4cf21be9badf3168806758700a6da6.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13071/254e269bb488ab778612fc6d887b7e8297535e78.png)