UVA552 Filling the Gaps

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=493 [PDF](https://uva.onlinejudge.org/external/5/p552.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA552/0b14d3dad06f4b9211c2c0578ecddc0a32d08f97.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA552/4e23db094d6e66ad6a5d47202d1e5f61addd7a2c.png)

Output Format

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