码迷,mamicode.com
首页 >  
搜索关键字:dp-概率dp    ( 24个结果
20140907_概率dp
概率dp假设关系;递归;倒着求POJ 2096#include #include #include #include #include using namespace std;double p[1086][1086];int x,y;double dp(int i,int j){ if(p[i...
分类:其他好文   时间:2014-09-07 11:01:35    阅读次数:274
poj 2096 Collecting Bugs(期望)
http://poj.org/problem?id=2096 程序的bug有n个子集,s个种类。每一个bug属于每个子集的概率为1/n,每一个bug属于每个种类的概率为1/s,问每个子集且每个种类都有bug的期望。 求期望,设dp[i][j]表示已有bug属于i个子集,j个种类的期望,现已知终态为dp[n][s] = 0,dp[i][j]可由逆推而得: dp[i][j...
分类:其他好文   时间:2014-09-05 21:11:46    阅读次数:231
poj 2151 Check the difficulty of problems(概率dp)
http://poj.org/problem?id=2151 有t个队伍,m道题,给出每个队伍做出每道题的概率。求出每个队伍至少做出一道题并且冠军队伍至少做出n道题的概率。 只要设出数组来,就很直观了。 dp[i][j][k]表示第i个队伍在前j道题中解出k道题的概率,s[i][j]表示第i个队伍最多解出j道题的概率。 首先初始化dp[i][0][0]和dp[i][j][0...
分类:其他好文   时间:2014-08-14 20:35:09    阅读次数:193
poj 2151 Check the difficulty of problems(概率DP)
DP-概率DP,一道简单题。...
分类:其他好文   时间:2014-07-21 23:15:53    阅读次数:279
24条   上一页 1 2 3
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!