HBC17412take题解

arkfactor 算法基础篇 32 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
Kanade has n boxes , the i-th box has p[i] probability to have an diamond of d[i] size. At the beginning , Kanade has a diamond of 0 size. She will open the boxes from 1-st to n-th. When she open a box,if there is a diamond in it and it's bigger than the diamond of her , she will replace it with her diamond. Now you need to calculate the expect number of replacements. You only need to output the answer module 998244353. Notice: If x%998244353=y*d %998244353 ,then we denote that x/y%998244353 =d%998244353

Kanade has n boxes , the i-th box has p[i] probability to have an diamond of d[i] size. At the beginning , Kanade has a diamond of 0 size. She will open the boxes from 1-st to n-th. When she open a box,if there is a diamond in it and it's bigger than the diamond of her , she will replace it with her diamond. Now you need to calculate the expect number of replacements. You only need to output the answer module 998244353. Notice: If x%998244353=y*d %998244353 ,then we denote that x/y%998244353 =d%998244353

HBC17412take题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC17412take题解