408189: GYM103048 J Just the Chosen One

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. Just the Chosen Onetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

Recently, a reality TV show called "Just the Chosen One" is becoming popular around the world. In the show, $$$n$$$ players get involved in a fierce competition for fabulous rewards sponsored by TuSimple, a world-famous company advancing in auto pilot technologies for logistic systems. Surprisingly however, the players compete with neither talent nor skill, but fortune.

Before the game starts, the $$$n$$$ players are ranked according to the Dow Jones Industrial Indexes (DJI, which reflects stock trends in the United States) when they were born (You can assume that their birthday DJIs are pairwise different). Initially, $$$n$$$ balls with the same shape, weight and temperature are put in a nontransparent black box, numbered in $$$1,2,\dots,n$$$。

Next, $$$n$$$ rounds will be carried out. In the $$$i$$$-th round:

  • The player with DJI-rank $$$i$$$ randomly chooses a ball from the box, and does not put it back;
  • All the players with balls will be ranked by the numbers on their balls, and players who have got the largest $$$m$$$ balls will get an AMAZING GIFT. If less than $$$m$$$ players have balls (i.e., less than $$$i$$$ rounds have been carried out), all the players who have got a ball will get an AMAZING GIFT. In other words, in the $$$i$$$-th round, $$$\min(i,m)$$$ players will get a gift.

Today, Cuber QQ finally gets a chance to prove that he is just "the Chosen One" — he was invited to participate in "Just the Chosen One"! Now Cuber QQ knows that he is ranked $$$k$$$ among all the competitors according to their birthday DJIs. He is wondering that what is the expected number of gifts that he will get.

Input

Three space-separated integers — $$$n,m,k$$$ ($$$1\le n,m,k \le 10^9$$$) in a line, representing the number of players, the maximum number of chosen ones in each round, and the rank of Cuber QQ.

Output

One line, containing a real number which represent the expected number of gifts that Cuber QQ will get. Your answer will be regarded as correct, if and only if the relative or absolute error is less than $$$10^{-6}$$$.

ExampleInput
5 2 5
Output
0.40000000

加入题单

算法标签: