UVA414 Machined Surfaces

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=6&page=show_problem&problem=355 [PDF](https://uva.onlinejudge.org/external/4/p414.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA414/f1e1a9e359d3363bf87b141985925d2a1d0923ea.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA414/5e66c395750e0b5e8a25804dbb16995a2e6de8f2.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA414/6bb2e37653546dfe99ccb9cae6b9bbd2e3e04ad0.png)