UVA11343 Isolated Segments

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=2318 [PDF](https://uva.onlinejudge.org/external/113/p11343.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11343/37f92d42061f1db8188ecd3d1066008689f2c7c7.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11343/0afe83d4184b88479b2e72c92ed10567f18c11fd.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11343/2c9aac780992bab956a21732a7196651dfdc88f3.png)