
概率
Green_G
这个作者很懒,什么都没留下…
展开
-
codeforces 518D Ilya and Escalator
题目链接:点击打开链接 题目大意是,有n个事件,按顺序排列,每一秒,排列在最前的事件有p的概率发生,发生后移出排列。(如果之前的事件没有发生,后面的事件都不会发生,每秒只有可能发生一件事) 问t秒后发生事件的数学期望 计算每一个时间点可能发生的事件的数量的概率,dp就行。 状态转移方程为dp[i][j] = dp[i-1][j] * (1-p) + dp[i-1][j-1] * p。i表示原创 2015-02-26 11:01:58 · 371 阅读 · 0 评论 -
HDU 5955 Guessing the Dice Roll
题目大意:#include <bits/stdc++.h> using namespace std;typedef long long ll;const int maxn = 100010;struct node{ int x; ll p; node(int x,ll p):x(x),p(p){} node(){} bool operator<(const n原创 2016-11-21 13:34:07 · 490 阅读 · 0 评论