UVA12285 Knockout Tournaments

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=244&page=show_problem&problem=3437 [PDF](https://uva.onlinejudge.org/external/122/p12285.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12285/a6686d341e38671379f90f86289dadaf47aa2e5d.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12285/09f0d3ee85de8f093a93240166086c53fe753073.png)