Logo
(追記) (追記ここまで)

13966번 - Risky Lottery 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB41211453.846%

문제

Prof. Peter dicided to surprise his class by organizing a new lottery with a very peculiar system.

He starts by announcing a small positive number M. Afterwards, each student is going to secretly write an integer from the set {1, ..., M} on a slip of paper that is then folded. After everyone has selected a number, they reveal all choices and whoever wrote down the lowest unique number is the winner!

For instance, if there are only three students in the class, two of them select number 2 and the other selects number 5, then the student who chose number 5 is the winner.

The lottery was a success, but Prof. Peter is now wondering what strategy his students should have used. If everyone follows the same optimal randomized strategy, with which probability should each number be chosen so that they maximize their chances of winning? A strategy is optimal if, when everyone is following it, then no individual student can improve his winning probability selecting a different strategy. Can you help Prof. Peter?

Given N, the number of students in the class, and M, the largest number they can write down, determine the optimal randomized strategy (followed by all students). That is, determine the probability of selecting each number between 1 and M.

입력

There is one line with two integers: N, which is the number of students in the class, and M, which is the largest integer each student can choose.

출력

The output consists of M lines. Line k should have the probability of selecting number k.

The result will be considered correct as long as the absolute error does not exceed 10-3.

제한

  • 3 ≤ N ≤ 7 Number of students in the class
  • 1 ≤ M ≤ N+1 Maximum number that can be selected

예제 입력 1

3 3

예제 출력 1

0.46410
0.26795
0.26795

예제 입력 2

7 1

예제 출력 2

1.00000

예제 입력 3

5 6

예제 출력 3

0.35785
0.31502
0.19107
0.09512
0.03515
0.00580

힌트

출처

ICPC > Regionals > Europe > Southwestern European Regional Contest > SWERC 2016 J번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /