HBC216006栗酱数数,枚举Fireworks题解

淫家是湿人 算法基础篇 68 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!
Kotori is practicing making fireworks for the upcoming hanabi taikai1. It takes her nnn minutes to make a single firework, and as she is not really proficient in making fireworks, each firework only has a probability of p×104p times 10^{-4}p×104 to be perfect. After she finishes making a firework, she can just start making the next firework, or take mmm minutes to light all the remaining fireworks finished before. If there is at least one perfect firework among the lit ones, she will be happy and go to rest. Otherwise, she will continue practicing. Can you tell her the minimum expected practicing time before she goes to rest if she takes the optimal strategy?Notice that no matter how many fireworks remain, it always takes mmm minutes to light them all. 1Hanabi taikai: Romaji of the Japanese word "花火大會", which means the firework... err... party?

Kotori is practicing making fireworks for the upcoming hanabi taikai1. It takes her nnn minutes to make a single firework, and as she is not really proficient in making fireworks, each firework only has a probability of p×10−4p times 10^{-4}p×10−4 to be perfect. After she finishes making a firework, she can just start making the next firework, or take mmm minutes to light all the remaining fireworks finished before. If there is at least one perfect firework among the lit ones, she will be happy and go to rest. Otherwise, she will continue practicing. Can you tell her the minimum expected practicing time before she goes to rest if she takes the optimal strategy? Notice that no matter how many fireworks remain, it always takes mmm minutes to light them all.                                      1Hanabi taikai: Romaji of the Japanese word "花火大會", which means the firework... err... party?

HBC216006栗酱数数,枚举Fireworks题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

标签: HBC216006栗酱数数 枚举Fireworks题解