mirror of
https://gitcode.com/Zengtudor/alg2025.git
synced 2025-09-05 17:50:36 +00:00
14 lines
247 B
C++
14 lines
247 B
C++
/*
|
||
假设一个随机数生成器每次随机一个数[1,n],形成一个无限长的字符串s,
|
||
给定一个长度为m的数,那么第一次在s中出现位置的期望是多少
|
||
|
||
n=2 12 的位置
|
||
e[1]=1/2*1+1/2*(e[1]+1)
|
||
|
||
|
||
|
||
*/
|
||
|
||
int main(){
|
||
|
||
} |