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

建议使用的浏览器:

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

1217:FOUR QUARTERS

题目描述
Four Quarters is a game of chance played with, well, four quarters. Two people, called A and B, each flip two quarters each round. They each gain or lose points each round based on the following tables:

There is no difference between Heads/Tails and Tails/Heads. As you can see, the odds are stacked in Player A's favor. At the beginning of the game, each player has 0 points, and points accumulate as the game progresses. At the
end of the game, whichever player has the most points wins.
You must write a program that determines the probability that Player A will win, Player B will win, or they will tie, after a certain number of rounds. Assume that the coins are fair, i.e. that heads and tails are equally likely.
输入解释
There is no input file for this problem.
输出解释
Output a table that lists the probability that Player A will win, B will win, or they will tie, after each round for 1 to 20 rounds. The output for rounds 1 through 3 is given below.
Probabilities must be expressed as a percent, with 4 places after the decimal.
输出样例
Round   A wins    B wins    Tie
    1   43.7500%  18.7500%  37.5000%
    2   56.6406%  22.2656%  21.0938%
    3   62.3535%  22.7051%  14.9414%

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Greater New York 2002

源链接: POJ-1217

最后修改于 2020-10-29T05:57:56+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 10000