UVA10786 Qualify for the Champions League

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1727 [PDF](https://uva.onlinejudge.org/external/107/p10786.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10786/924cb4ad1a24f19d95d906be4eb325d0d84e50da.png)

Input Format

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

Output Format

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