UVA11156 Continuous Drawing

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=23&page=show_problem&problem=2097 [PDF](https://uva.onlinejudge.org/external/111/p11156.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11156/bfcd2602894ac8517b229a65393bdb815bfff306.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11156/48610ed07fc44178e6a664b81c08fdd1c2a1eabc.png)

Output Format

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