AT_abc404_f [ABC404F] Lost and Pound
Description
There are $ N $ push buttons. One of them is the winning button, and the other $ N-1 $ are losing buttons.
Aoki knows which button is winning, but Takahashi does not. Also, Takahashi cannot distinguish the $ N $ buttons.
They play a game using these buttons. The game consists of repeating the following sequence $ T $ times:
1. Aoki arranges the $ N $ buttons in a random order.
2. Takahashi performs the operation “choose a button and press it” $ M $ times. He may choose the same button multiple times.
3. Aoki tells Takahashi the number of times the winning button has been pressed so far since the start of the game.
Takahashi wins if and only if the winning button has been pressed a total of at least $ K $ times throughout the $ T $ repetitions.
Find Takahashi’s probability of winning when he plays to maximize his win probability.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ T $ $ M $ $ K $
Output Format
Output the answer. Your output is considered correct if its absolute or relative error from the true answer is at most $ 10^{-6} $ .
Explanation/Hint
### Sample Explanation 1
The game can proceed as follows (not necessarily optimally):
- 1st repetition
- Aoki randomly arranges the buttons so that the winning button is at position $ 1 $ , and the losing buttons are at positions $ 2 $ and $ 3 $ .
- Takahashi presses button $ 1 $ .
- Takahashi presses button $ 2 $ .
- Aoki tells him the winning button has been pressed $ 1 $ time.
- 2nd repetition
- Aoki randomly arranges the buttons so that the winning button is at position $ 3 $ , and the losing buttons are at positions $ 1 $ and $ 2 $ .
- Takahashi presses button $ 3 $ .
- Takahashi presses button $ 3 $ .
- Aoki tells him the winning button has been pressed $ 3 $ times.
- Since the winning button has been pressed not less than $ 3 $ times, Takahashi wins.
The true answer in this case is $ \tfrac{2}{9} $ , so outputs like `0.222222` or `0.222223141592` are also accepted.
### Constraints
- $ 1 \le N \le 2\times 10^5 $
- $ 1 \le T \le 30 $
- $ 1 \le M \le 30 $
- $ 1 \le K \le 30 $
- All input values are integers.