UVA12711 Game of Throne

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4449 [PDF](https://uva.onlinejudge.org/external/127/p12711.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12711/d38adf6acff76551e5270a16c738f25ac97db452.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12711/6663ab7a7391cbcf1e509e635e6f15c6739e53b0.png)