题库练习 Tickets
← 上一题 下一题 →

A7820 | Tickets

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

As a big fan of Formula One, Charlie is really happy with the fact that he has to organize ticket sells for the next Grand Prix race in his own city. Unfortunately, the finacial crisis is striking everywhere and all the banknotes left in his country are valued either 10 euros or 20 euros. The price of all tickets for the race is 10 euros, so whenever someone comes to the ticket store only with 20 euro banknote Charlie must have a 10 euro banknote to give them change. Charlie realize that with the huge deficit of banknotes this could be a problem. Charlie has some priceless information but couldn't make use of it, so he needs your help. Exactly $n+m$ people will come to buy a ticket. $n$ of them will have only a single 10 euro banknote, and $m$ of them will have only a single 20 euro banknote. Currently Charlie has $k$ 10 euro banknotes, which he can use for change if needed. All $n+m$ people will come to the ticket store in random order, all orders are equiprobable. Return the probability that the ticket selling process will run smoothly, i.e. Charlie will have change for every person with 20 euro banknote.

输入格式

The input consist of a single line with three space separated integers, $n$ , $m$ and $k$ ( $0<=n,m<=10^{5}$ , $0<=k<=10$ ).

输出格式

Output on a single line the desired probability with at least $4$ digits after the decimal point.

输入输出样例

输入 #1
5 3 1
输出 #1
0.857143
输入 #2
0 5 5
输出 #2
1
输入 #3
0 1 0
输出 #3
0
C++ 编辑器
输入
输出