UVA12112 Iceman

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=243&page=show_problem&problem=3264 [PDF](https://uva.onlinejudge.org/external/121/p12112.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12112/d3cf08f672f2dfe0878d1d15c998ee86237e708d.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12112/3b16d84e0d8d6d3cfdfc15078898a4a0c468335a.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12112/76171f1514abdf86361a5e82a393655746a39204.png)