P17259 [ICPC 2017 Urumqi R] Coins
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.
Input Format
The input has several test cases and the first line contains the integer $t (1 \le t \le 1000)$ which is the total number of cases.
For each case, a line contains three space-separated integers $n$, $m (1 \le n, m \le 100)$ and $k (1 \le k \le n)$.
Output Format
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.