Collecting Bugs
Time Limit: 10000MS
Memory Limit: 64000K
Total Submissions: 3091
Accepted: 1521
Case Time Limit: 2000MS
Special Judge
Description
Ivan is fon...
分类:
其他好文 时间:
2015-05-04 18:08:28
阅读次数:
174
uva11021http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1962给定n,k,m有k个麻雀,每只活一天就会死,临死之前生出i只麻雀的概率为pi , 0n...
分类:
其他好文 时间:
2015-05-04 17:47:38
阅读次数:
102
Codeforces Div.301D Bad Luck Island(概率dp+记忆化搜索)
分类:
其他好文 时间:
2015-05-02 23:17:07
阅读次数:
239
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and i...
分类:
其他好文 时间:
2015-05-02 13:56:55
阅读次数:
165
题目链接:http://codeforces.com/problemset/problem/148/D
题目大意:一袋子里有w个白老鼠,b个黑老鼠;A和B轮流抓老鼠(不放回),谁先抓到白老鼠,谁win;因为B粗鲁,每次抓完一只老鼠,会跑出来一只;A first;
求A win的概率;
题目分析:
此类概率dp的状态比较固定,dp(i , j )表示当前状态Awin的...
分类:
其他好文 时间:
2015-05-02 09:38:39
阅读次数:
130
1.题目描述:点击打开链接
2.解题思路:本题利用概率dp解决。一开始想着如何推出每一个最终的概率公式,没有思路。最后发现其实可以通过概率dp解决。设状态d(i,j,k)为还有i个石头,j个剪刀,k个布时的概率,那么不难得到以下三个递推式:
d(i-1,j,k)+=d(i,j,k)*(i*k)/(i*j+i*k+j*k);
d(i,j-1,k)+=d(i,j,k)*(i*j)/(i*j+i*...
分类:
其他好文 时间:
2015-05-01 13:29:11
阅读次数:
110
Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means when you throw the dic...
分类:
其他好文 时间:
2015-05-01 12:08:28
阅读次数:
141
1265 - Island of Survival
PDF (English)
Statistics
Forum
Time Limit: 2 second(s)
Memory Limit: 32 MB
You are in a reality show, and the show is way too real t...
分类:
其他好文 时间:
2015-05-01 12:08:02
阅读次数:
542
题意:一个岛上有石头人,剪刀人,布人,每天会有两个人相遇,根据相克会死掉一个人。问最后只剩下石头人的几率,只剩剪刀人的几率,布人的几率。
做法:dp[i][j][k] 代表有i个石头,j个剪刀,k个布的几率。
以剪刀和布相遇为例,会有转移 dp[i][j][k-1]+=dp[i][j][k]*j*k/(i+j+k)/(i+j+k-1) 。
但是这是不够的,因为还有平局的情况。平局的时候,状态又转移回了dp[i][j][k],又从原状态开始转移,所以转移的比例还是一样的。
所以可以直接把 所有的转移几率相加...
分类:
其他好文 时间:
2015-05-01 10:40:31
阅读次数:
154
Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means when you throw the dice...
分类:
其他好文 时间:
2015-04-30 18:22:36
阅读次数:
99