NC237335[CQOI2017]老C的任务,树状数组,数据结构Generator题解

arkfactor STL编程 64 0
全网最全C++题库,助您快速提升编程技能!题库丰富多样,涵盖各个领域,让您在练习中不断成长!

Mr.L has a uniform random generator. In the beginning, Mr. L will input an integer NNN, and then pushes the generate button. The generator will output a random integer x∈[1,N]xin [1,N]x∈[1,N]. Then he will push the button again, and the generator will output a random integer y∈[1,x]yin [1,x]y∈[1,x] and so on and so forth. It is clear that the output is non-increasing, and after a number of pushes, the output will at last be 111. Now he wants to know the expected number of pushes to obtain 111 as output.

全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: NC237335[CQOI2017]老C的任务 树状数组 数据结构Generator题解

上一篇当前分类已是最后一篇

下一篇HBC24261小宝的01游戏[USACO 2019 Feb G]Cow Land题解