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

28151번 - Game Show Elimination 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
8 초 2048 MB116583.333%

문제

You are running an elimination-style game show, where players are eliminated one at a time until only one remains. Based on what you know about the contestants, you are trying to predict the results.

Each week, the remaining contestants take part in a competition, where each contestant's score is based on their skill level. Because this is a silly game show, a contestant's score is a random number that falls within their unique skill range. The contestants are then ranked from highest to lowest based on their scores. (Since scores are all real numbers, there is zero probability that there is a tie.)

The winner of this week's competition chooses who is eliminated that week. However, all players believe they should pick whoever did the best after them in the week's competition, so they always choose to eliminate the second place contestant. That contestant is eliminated and goes home. The show continues, week after week, until there is only one contestant left.

The contestants' final ranks are based on when they left the competition. The last contestant to leave (the winner!) is assigned rank 1ドル,ドル the second-to-last gets rank 2ドル,ドル and so on until the first person to leave is assigned the lowest rank.

Given information about the contestants' skill levels, compute the expected ranks of each player.

입력

The single line of input contains two integers $n$ (2ドル \leq n \leq 1,000円$) and $k$ (2ドル \leq k \leq 10$), where $n$ is the number of game show contestants, and $k$ determines the skill range of the contestants.

Contestants are numbered from 1ドル$ to $n$. The skill range of contestant $i$ is from $i$ to $i+k$ inclusive, and their score each week is a randomly assigned real number in this range.

출력

Output $n$ lines. Each line contains a single real number, which is the expected rank of a contestant. The expected ranks must be listed in contestant number order. The answers are accepted within absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

3 2

예제 출력 1

2.109375
2.625000
1.265625

힌트

출처

ICPC > Regionals > North America > North America Championship > North America Championship 2023 H번

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

출처

대학교 대회

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

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