当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

4326:Game

题目描述
There are N people playing a game. The rules of the game are described as follows:
Initially, there are N people numbered from 1-N. And they are arranged in a queue by the order from 1-N. Each round, only 4 people get into the game and each people has equally probability to win the game. The winner can continue to games, the loser will go to the end of the queue according to the order before this round (if someone was the winner before this round, we can consider he was the head of the queue).
The first round of game, the first four people start to play the game. If someone continuously wins the game M times, he will become the final winner.
Now I want to know the probability for the K-th people to become the final winner.
输入解释
The first line of input contains T, the number of test cases.
Flowing T line, each line contains 3 integer N, M, K.(4<=N<=10, M<=10,K<=N)
输出解释
Each output should occupy one line. Each line should start with "Case #i : ", followed by the answer round to six decimal places.
输入样例
3
4 1 1
5 1 5
5 2 1
输出样例
Case #1: 0.250000
Case #2: 0.000000
Case #3: 0.217626
来自杭电HDUOJ的附加信息
Author BJTU
Recommend zhoujiaqi2010

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4326

最后修改于 2020-10-25T23:12:26+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000/5000MS(Java/Others) 65536/65536K(Java/Others)