{"problem":{"name":"T-shirt","description":{"content":"In a certain programming contest, T-shirts are awarded to participants according to the following rules. *   All participants who ranked $A$\\-th or higher get a T-shirt. *   Additionally, from the pa","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc242_a"},"statements":[{"statement_type":"Markdown","content":"In a certain programming contest, T-shirts are awarded to participants according to the following rules.\n\n*   All participants who ranked $A$\\-th or higher get a T-shirt.\n*   Additionally, from the participants who ranked between $(A+1)$\\-th and $B$\\-th (inclusive), $C$ participants chosen uniformly at random get a T-shirt.\n\nThere were $1000$ participants in this contest, and all of them got different ranks.  \nIroha-chan, who participated in this contest, ranked $X$\\-th.  \nFind the probability that she gets a T-shirt.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\le A < B \\le 1000$\n*   $1 \\le C \\le B-A$\n*   $1 \\le X \\le 1000$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$A$ $B$ $C$ $X$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc242_a","tags":[],"sample_group":[["30 500 20 103","0.042553191489\n\nIroha-chan ranked $103$\\-rd.  \nShe will get a T-shirt if she is among the $20$ participants chosen uniformly at random from the $470$ participants who ranked between $31$\\-st and $500$\\-th, which happens with probability $\\frac{20}{470}=0.04255319\\dots$."],["50 500 100 1","1.000000000000\n\nIroha-chan ranked $1$\\-st. This time, she is guaranteed to get a T-shirt."],["1 2 1 1000","0.000000000000\n\nIroha-chan ranked $1000$\\-th. This time, she will never get a T-shirt."]],"created_at":"2026-03-03 11:01:14"}}