UVA567 Risk

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=508 [PDF](https://uva.onlinejudge.org/external/5/p567.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA567/69c736a0be7d6caaddf40c6f8d4ffbdbc3dc92d7.png)

输入格式

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA567/0bbb3c9c395bee572d6ebb8f7e6e7e33c40d0c5d.png)

输出格式

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