1867. Volley ball

单点时限: 2.0 sec

内存限制: 256 MB

In the current “rally scoring” used in volleyball, each serve results in one point, either for the serving team or for the receiving team. Whoever wins the point is the server on the next point. The winning team is the first team to win at least 15 points and be at least 2 points ahead of the other team.

Suppose that two teams are playing a game, and that they are evenly matched. On each point, whichever team serves has a fixed probability, probWinServe, that they will win the point. (Of course, the receiving team will win the point with probability $1.0 -$ probWinServe.)

输入格式

Give you two interger sScore (the current score of the serving team), rScore (the current score of the receiving team), and a floating point number probWinServe.

  • sScore and rScore will be between 0 and 100 inclusive.
  • probWinServe will be greater than or equal to 0.01
  • probWinServe will be less than or equal to 0.99
  • If either sScore or rScore is greater than 14, then sScore=rScore or else sScore=rScore+1.
  • If sScore equals 0, then rScore will also be 0.

输出格式

A floating point number of the probability that the serving team will win the game. Absolute error must not exceed $10^{-8}$.

样例

Input
13 13 0.5
8 12 0.4
Output
0.50000000
0.04637789

3 人解决,6 人已尝试。

5 份提交通过,共有 11 份提交。

8.3 EMB 奖励。

创建: 16 年,8 月前.

修改: 6 年,10 月前.

最后提交: 4 年,9 月前.

来源: N/A

题目标签