UVA12210 A Match Making Problem

Description

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

Input Format

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

Output Format

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