UVA703 Triple Ties: The Organizer's Nightmare

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=644 [PDF](https://uva.onlinejudge.org/external/7/p703.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA703/1f66242ddf44095ab50ffeef4c51168a738a7adb.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA703/0446236313a12edbdca9d12026acbcd4dc5a4ef3.png)