UVA11748 Rigging Elections

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2848 [PDF](https://uva.onlinejudge.org/external/117/p11748.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11748/4c439c54cf8016ef75104bc997a9e74914d8e472.png)

Input Format

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

Output Format

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