{"problem":{"name":"Black Jack","description":{"content":"You will play a game against a dealer. The game uses a $D$\\-sided die (dice) that shows an integer from $1$ to $D$ with equal probability, and two variables $x$ and $y$ initialized to $0$. The game pr","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc342_f"},"statements":[{"statement_type":"Markdown","content":"You will play a game against a dealer. The game uses a $D$\\-sided die (dice) that shows an integer from $1$ to $D$ with equal probability, and two variables $x$ and $y$ initialized to $0$. The game proceeds as follows:\n\n*   You may perform the following operation any number of times: roll the die and add the result to $x$. You can choose whether to continue rolling or not after each roll.\n    \n*   Then, the dealer will repeat the following operation as long as $y < L$: roll the die and add the result to $y$.\n    \n*   If $x > N$, you lose. Otherwise, you win if $y > N$ or $x > y$ and lose if neither is satisfied.\n    \n\nDetermine the probability of your winning when you act in a way that maximizes the probability of winning.\n\n## Constraints\n\n*   All inputs are integers.\n*   $1 \\leq L \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq D \\leq N$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $L$ $D$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc342_f","tags":[],"sample_group":[["3 2 2","0.468750000000000\n\nIt can be proved that the optimal strategy is to continue rolling as long as $x$ is not greater than $2$."],["200000 200000 200000","0.999986408692793"]],"created_at":"2026-03-03 11:01:14"}}