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

25228번 - Double Sort 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1.5 초 (추가 시간 없음) 1024 MB42191241.379%

문제

Given two integers $n$ and $m$ ($n \le m$), you generate a sequence of $n$ integers as follows:

  1. First, choose $n$ distinct integers between 1ドル$ and $m,ドル inclusive.
  2. Sort these numbers in non-decreasing order.
  3. Take the difference sequence, which transforms a sequence $a_1,ドル $a_2,ドル $a_3,ドル $\ldots$ into $a_1,ドル $a_2-a_1,ドル $a_3-a_2,ドル $\ldots$
  4. Sort the difference sequence in non-decreasing order.
  5. Take the prefix sums of the sorted difference sequence to get the final sequence. This transforms a sequence $b_1,ドル $b_2,ドル $b_3,ドル $\ldots$ into $b_1,ドル $b_2+b_1,ドル $b_3+b_2+b_1,ドル $\ldots$

For example, with $n = 3$ and $m = 10$:

  1. Suppose we initially chose 6ドル,ドル 2ドル,ドル 9ドル$.
  2. The sequence in order is 2ドル,ドル 6ドル,ドル 9ドル$.
  3. The difference sequence is 2ドル,ドル 4ドル,ドル 3ドル$.
  4. The sorted difference sequence is 2ドル,ドル 3ドル,ドル 4ドル$.
  5. The prefix sums of the sorted difference sequence are 2ドル,ドル 5ドル,ドル 9ドル$.

Suppose you chose a uniformly random set of distinct integers for step 1ドル$. Compute the expected value for each index in the final sequence.

입력

The single line of input contains two integers $n$ (1ドル \le n \le 50$) and $m$ ($n \le m \le 10,000円$), where $n$ is the size of the sequence, and all of the initial integers chosen are in the range from 1ドル$ to $m$.

출력

Output $n$ lines. Each line contains a single real number, which is the expected value at that index of the final sequence. Each answer is accepted with absolute or relative error at most 10ドル^{-6}$.

제한

예제 입력 1

3 5

예제 출력 1

1
2.3
4.5

힌트

출처

ICPC > Regionals > North America > North America Championship > North America Championship 2022 D번

Camp > Petrozavodsk Programming Camp > Summer 2022 > Day 1: Welcome Contest E번

  • 문제를 만든 사람: Lewin Gan
(追記) (追記ここまで)

출처

대학교 대회

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

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