시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 (추가 시간 없음) | 1024 MB | 117 | 86 | 49 | 81.667% |
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:
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:
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}$.
3 1 1
0.666667
8 4 2
0.75
15 4 2
0.32592593
ICPC > Regionals > Europe > Northwestern European Regional Contest > German Collegiate Programming Contest > GCPC 2021 M번