codeforces865C】的更多相关文章

题意:一个游戏一共有n个关卡,对于第i关,用a[i]时间通过的概率为p[i],用b[i]通过的时间为1-p[i],每通过一关后可以选择继续下一关或者时间清0并从第一关开始,先要求通过所有关卡的时间和不能超过R才算彻底通关,问直到彻底通关位置的游戏时间的期望值为多少 题解: 刚开始没看懂题目就直接看题解了.. 不过我感觉对这类题天生不太擅长.. 令f[i][j]表示当前为第i关,用时为j(这个还是挺好想的) 然后呢就就是期望的套路倒推一下 f[i][j]=(f[i+1][j+a[i]]+a[i])…
Gotta Go Fast CodeForces - 865C You're trying to set the record on your favorite video game. The game consists of Nlevels, which must be completed sequentially in order to beat the game. You usually complete each level as fast as possible, but someti…