![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学-概率期望
文章平均质量分 84
_lifehappy_
这个作者很懒,什么都没留下…
展开
-
D. Steps to One(概率DP,莫比乌斯反演)
D. Steps to One设f[i]f[i]f[i]为gcd\gcdgcd为iii,还需要多少个数,那么有f[i]=1+∑j=1mf[gcd(i,j)]mf[i] = 1 + \frac{\sum\limits_{j = 1} ^{m} f[\gcd(i, j)]}{m}f[i]=1+mj=1∑mf[gcd(i,j)],f[1]=0f[1] = 0f[1]=0,考虑化简∑j=1mf[gcd(i,j)]\sum\limits_{j = 1} ^{m} f[\gcd(i, j)]j=1∑mf原创 2021-04-14 17:28:10 · 306 阅读 · 0 评论 -
概率期望dp
概率期望LOOPSdp[i][j]dp[i][j]dp[i][j]表示从i,ji, ji,j到r,cr, cr,c的期望,有dp[i][j]=p0×dp[i][j]+p1×dp[i][j+1]+p2×dp[i+1][j]+2dp[i][j] = p_0 \times dp[i][j] + p_1 \times dp[i][j + 1] + p_2 \times dp[i + 1][j] + 2dp[i][j]=p0×dp[i][j]+p1×dp[i][j+1]+p2×dp[i+1][j]+2有d原创 2021-01-22 22:07:14 · 271 阅读 · 0 评论