UVA248 Cutting Corners

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=184 [PDF](https://uva.onlinejudge.org/external/2/p248.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA248/9d14672568adea1b8808d3da2f222dfcefc91200.png)

Input Format

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

Output Format

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