概率dp
小菜鸡加油
菜鸡
什么都能折磨
展开
-
D. Ilya and Escalator(思维+概率dp)
https://codeforces.com/problemset/problem/518/D思路:定义dp[t][j]为到t秒j个人上了电梯的概率转移:dp[t][j]=dp[t-1][j-1]*p+dp[t-1][j]*(1-p);边界:j==0的时候转移仍然要*(1-p)j==n的时候前者的转移是100%的答案是ans+=dp[t][j:0~n]*j#include<iostream>#include<vector>#include&l原创 2021-03-16 20:15:25 · 209 阅读 · 0 评论 -
B. Andrey and Problem
https://codeforces.com/problemset/problem/442/B题目描述Andrey needs one more problem to conduct a programming contest. He hasnnfriends who are always willing to help. He can ask some of them to come up with a contest problem. Andrey knows one value for e..原创 2020-09-04 20:25:32 · 177 阅读 · 0 评论 -
D. Bag of mice(概率dp)
https://codeforces.com/problemset/problem/148/D原创 2020-09-05 20:04:34 · 315 阅读 · 0 评论