概率
文章平均质量分 80
ccyy-
这个作者很懒,什么都没留下…
展开
-
POJ-1243 One Person (经典级dp)猜数字
In the game show "The Price is Right", a number of players (typically 4) compete to get on stage by guessing the price of an item. The winner is the person whose guess is the closest one not exceeding转载 2015-04-06 23:13:26 · 861 阅读 · 0 评论 -
Poj 2096 Collecting Bugs(概率(期望)+dp)
/** dp求期望的题。 题意:一个软件有s个子系统,会产生n种bug。 某人一天发现一个bug,这个bug属于某种bug,发生在某个子系统中。 求找到所有的n种bug,且每个子系统都找到bug,这样所要的天数的期望。 需要注意的是:bug的数量是无穷大的,所以发现一个bug,出现在某个子系统的概率是1/s, 属于某种类型的概率是1/n。转载 2015-04-05 14:28:34 · 439 阅读 · 0 评论 -
zoj 2949 Coins of Luck 抛硬币(概率(期望)+dp)
Luck is the key to life. When I have to decide something, I will make my decision by flipping a coin. And then, I have two things to do. First, I have the decision made. Second, I go to the nearest ch原创 2015-04-09 18:55:34 · 601 阅读 · 0 评论 -
zoj 3868 GCD Expectation(容斥原理)
Edward has a set of n integers {a1, a2,...,an}. He randomly picks a nonempty subset {x1, x2,…,xm} (each nonempty subset has equal probability to be picked), and would like to know the expectation of原创 2015-04-15 17:09:24 · 498 阅读 · 0 评论 -
zoj 3329 One Person Game(概率(期望)+dp)经典
There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 has K1 faces.Die2 has K2 faces. Die3 has K3 faces. All the dice are fair dice, so the probab原创 2015-04-05 14:05:02 · 519 阅读 · 0 评论 -
hihocoder 随机斐波那契(期望,水题)
大家对斐波那契数列想必都很熟悉: a0 = 1, a1 = 1, ai = ai-1 + ai-2,(i > 1)。 现在考虑如下生成的斐波那契数列: a0 = 1, ai = aj + ak, i > 0, j, k从[0, i-1]的整数中随机选出(j和k独立)。 现在给定n,要求求出E(an),即各种可能的a数列中an的期望值。 输入 一行一个整数原创 2015-05-08 21:57:41 · 641 阅读 · 0 评论