UVA351 "Cheapest" Scores

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=5&page=show_problem&problem=287 [PDF](https://uva.onlinejudge.org/external/3/p351.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA351/aa603519b5da8daa9a3be738ee95de0103bc00da.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA351/2bba8edbe00a207b5c74bcafc5c428057e0e881d.png)