UVA12657 移动盒子 Boxes in a Line

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=602&page=show_problem&problem=4395 [PDF](https://uva.onlinejudge.org/external/126/p12657.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12657/1170ffadcd74eec4928cd5a71382467fc466a216.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12657/751828928c77c47a3b980cb8ef0397aba418ffbc.png)

Output Format

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