#571
Unrated
Cow Camp
시간 제한
2s
메모리 제한
1024MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

To qualify for cow camp, Bessie needs to earn a good score on the last problem of the USACOW Open contest. This problem has TT distinct test cases (2T1032\le T\le 10^3) weighted equally, with the first test case being the sample case. Her final score will equal the number of test cases that her last submission passes.

Unfortunately, Bessie is way too tired to think about the problem, but since the answer to each test case is either "yes" or "no," she has a plan! Precisely, she decides to repeatedly submit the following nondeterministic solution:

if input == sample_input: print sample_output else: print "yes" or "no" each with probability 1/2, independently for each test case

Note that for all test cases besides the sample, this program may produce a different output when resubmitted, so the number of test cases that it passes will vary.

Bessie knows that she cannot submit more than KK (1K1091\le K\le 10^9) times in total because then she will certainly be disqualified. What is the maximum possible expected value of Bessie's final score, assuming that she follows the optimal strategy?

입력

The only line of input contains two space-separated integers TT and K.K.

출력

The answer as a decimal that differs by at most 10610^{-6} absolute or relative error from the actual answer.

예제 입력 1

2 3

예제 출력 1

1.875

예제 입력 2

4 2

예제 출력 2

2.8750000000000000000

점수

Test cases 3-6 satisfy T25T\le 25 and K100.K\le 100.Test cases 7-9 satisfy K106.K\le 10^6.Test cases 10-17 satisfy no additional constraints.

코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.