UVA11601 Avoiding Overlaps

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2648 [PDF](https://uva.onlinejudge.org/external/116/p11601.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11601/61794ebeb95741f3049f1c590d9083bf777b3ea6.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11601/fec6dad39d2ac6ccab54409f2a1adacfa54a626d.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11601/1593b44f245ed9816baab1b5818191c52e2dbd72.png)