UVA569 Horse Shoe Scoring

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=510 [PDF](https://uva.onlinejudge.org/external/5/p569.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA569/cdcda54d2a81bcd9943bfac2fd9ee1a8d5f26d98.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA569/89a8445af8e86f30e277e25f145f0fcf466451d5.png)