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

25257번 - Monty's Hall 스페셜 저지다국어

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

문제

You have explored the deep catacombs under a long lost city for the past couple of hours and finally you have reached their end: The hall of the undead wizard Monty. His restless spirit materialises in front of you and you prepare for battle.

However, it turns out that you are the first explorer to find him in over a hundred years, so he has grown incredibly bored. Instead of a fight, he offers to play a game for his artefacts. The hall has $d$ closed doors, but only one of them leads to the artefacts (Monty knows which one it is, of course). The procedure is as follows:

  1. You choose $s$ closed doors.
  2. Monty opens $e$ doors that were not selected by you and lead to empty rooms.
  3. Among the remaining closed doors, you may change your selection of $s$ doors however you want (you can even stay with your current selection if you wish to).
  4. Monty reveals which door leads to the room with his artefacts.

If the door with the artefacts is among your selected doors, you win and can take them with you unscathed. If not, Monty will transform you into a goat. So you better hope your luck is on point today.

입력

The input consists of:

  • One line with three integers $d,ドル $s$ and $e$ (1ドル \le d,s,e \le 10^{6}, s + e < d$), the number of doors in Monty's hall, the number of doors you are allowed to select and the number of doors Monty opens in step 2.

출력

Output your chance to win at Monty's game when playing optimally. Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

3 1 1

예제 출력 1

0.666667

예제 입력 2

8 4 2

예제 출력 2

0.75

예제 입력 3

15 4 2

예제 출력 3

0.32592593

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > German Collegiate Programming Contest > GCPC 2021 M번

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

출처

대학교 대회

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

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