8975: ICPC2017 - Coins I
[Creator : ]
Description
Alice and Bob are playing a simple game. They line up a row of n identical coins, all with the heads facing down onto the table and the tails upward.
For exactly $m$ times they select any $k$ of the coins and toss them into the air, replacing each of them either heads-up or heads-down with the same possibility. Their purpose is to gain as many coins heads-up as they can.
For exactly $m$ times they select any $k$ of the coins and toss them into the air, replacing each of them either heads-up or heads-down with the same possibility. Their purpose is to gain as many coins heads-up as they can.
Input
The input has several test cases.
The first line contains the integer $t\ (1 ≤ t ≤ 1000)$ which is the total number of cases.
For each case, a line contains three space-separated integers $n, m\ (1 ≤ n, m ≤ 100)$ and $k\ (1 ≤ k ≤ n)$.
The first line contains the integer $t\ (1 ≤ t ≤ 1000)$ which is the total number of cases.
For each case, a line contains three space-separated integers $n, m\ (1 ≤ n, m ≤ 100)$ and $k\ (1 ≤ k ≤ n)$.
Output
For each test case, output the expected number of coins heads-up which you could have at the end under the optimal strategy, as a real number with the precision of $3$ digits.
Sample 1 Input
6
2 1 1
2 3 1
5 4 3
6 2 3
6 100 1
6 100 2
Sample 1 Output
0.500
1.250
3.479
3.000
5.500
5.000