UVA10840 Multi-stage Compressor

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1781 [PDF](https://uva.onlinejudge.org/external/108/p10840.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10840/fba404b59e6eaccde680c63776057801abd79eba.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10840/1014efdfb50bd97c7bc54c49554835dbdfb227e0.png)