|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||512 MB||13||12||11||91.667%|
You are one of 2k competitors invited to enter a single elimination tournament. You are ranked rth in the published rankings. Furthermore, you know that in any match between two players, the one ranked higher will always win.
The only source of uncertainty is the bracket. If every possible tournament bracket is equally likely, determine your expected number of wins in the tournament. Your expected number of wins is the average number of your wins over all possible tournament bracket orderings.
The input consists of a single line containing the two space-separated integers k (1 ≤ k ≤ 20) and r (1 ≤ r ≤ 2k).
Print, on a single line, your expected number of wins in the tournament, rounded and displayed to exactly five decimal places. The sixth digit after the decimal point of the exact answer will never be 4 or 5 (eliminating complex rounding considerations).
Be careful about very small or very large numbers during intermediate steps.