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

34374번 - Basketball Modeling 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB755100.000%

문제

It's the start of another exciting season for Mines' women's basketball team! After crunching all of the data from previous seasons, student data scientists at Mines have identified a model that accurately predicts how many points the team will score in a game. Unfortunately, the model is rather complicated, and they need your help to crunch the numbers!

Throughout the course of a game, the team will have a positive number of discrete possessions. During each possession, the team will do one of three things: attempt a 2ドル$-point shot, attempt a 3ドル$-point shot, or make no shot attempt. On every possession, the team will attempt a 2ドル$-point shot with a probability of $A_2$ percent, and a 3ドル$-point shot with a probability of $A_3$ percent. Given that the team attempts a 2ドル$-point shot on their $i^{\text{th}}$ possession, they have a probability of $M_{2, i}$ percent that the shot is successful, scoring two points for the possession. Similarly, given that the team attempts a 3ドル$-point shot on their $i^{\text{th}}$ possession, they have a probability of $M_{3, i}$ percent that the shot is successful, scoring three points for the possession. If either type of shot attempt is unsuccessful, or no shot is attempted during a possession, it results in zero points scored for that possession. A possession ends after a shot has been made, missed, or if no shot was attempted.

The shot probabilities for the first possession, $M_{2, 1}$ and $M_{3, 1}$ are known. However, after missing or making a shot, the team's confidence in their ability to make that same type of shot on the next possession changes, which influences the probability of them making that shot.

Specifically, the team has known confidence adjustments $C_2$ and $C_3$. If they attempt a 2ドル$-point shot on their $i^{\text{th}}$ possession and make it, then $M_{2, i + 1} = \min(M_{2, i} + C_2, 100)$ (they cannot have more than a 100ドル$ percent chance of making a shot, of course). If they however miss the shot, then $M_{2, i + 1} = \max(M_{2, i} - C_2, 0)$ (they similarly cannot have less than a zero percent chance of making a shot). Similarly, if they attempt a 3ドル$-point shot on their $i^{\text{th}}$ possession and make it, then $M_{3, i + 1} = \min(M_{3, i} + C_3, 100),ドル but if they miss it, then $M_{3, i + 1} = \max(M_{3, i} - C_3, 0)$.

If the team does not attempt a 2ドル$-point shot on their $i^{\text{th}}$ possession, then the shot probability for the 2ドル$-point shot remains unchanged for the next possession ($M_{2, i + 1} = M_{2, i}$). Similarly, if the team does not attempt a 3ドル$-point shot on their $i^{\text{th}}$ possession, the shot probability of the 3ドル$-point shot remains unchanged for the next possession ($M_{3, i + 1} = M_{3, i}$). If no shot is attempted during a possession, then neither shot type has been attempted, and both shot probabilities remain the same for the next possession.

What is the expected number of points that the team will score in total across all $N$ possessions that they will have during a game? The expected number of points is the weighted average of the number of points that the team will score in total across all $N$ possessions.

입력

The first line of input contains a single integer 1ドル \leq N \leq 100,ドル the number of possessions that the team will have during a game.

The second line of input contains two space-separated integers, 0ドル \leq A_2 \leq 100,ドル and 0ドル \leq A_3 \leq 100,ドル the percent probabilities that the team attempts a 2ドル$-point and 3ドル$-point shot, respectively. Note that 0ドル \leq A_2 + A_3 \leq 100$.

The third line of input contains two space-separated integers, 0ドル \leq M_{2, 1} \leq 100,ドル and 0ドル \leq M_{3, 1} \leq 100,ドル the percent probabilities that the team makes a 2ドル$-point or 3ドル$-point shot on their first possession, respectively.

The fourth and final line of input contains two space-separated integers, 0ドル \leq C_2 \leq 100,ドル and 0ドル \leq C_3 \leq 100,ドル the confidence adjustments for the 2ドル$-point and 3ドル$-point shots, respectively, whose definitions are provided above.

출력

Your output should be a single line, containing a single real number, the expected number of points that the team will score over the $N$ possessions. Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

1
50 30
40 20
5 10

예제 출력 1

0.58

예제 입력 2

3
70 20
60 40
5 10

예제 출력 2

3.26279

노트

In the first sample, there is a single possession. The expected number of points scored in that possession is 2ドル \cdot \frac{50}{100} \cdot \frac{40}{100} + 3 \cdot \frac{30}{100} \cdot \frac{20}{100} = 0.58$

출처

School > CS@Mines > CS@Mines HSPC 2023 > Advanced B번

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

출처

대학교 대회

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

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