4176.The World is a Theatre

Time Limit: 1s Memory Limit: 256MB

There are n boys and m girls attending a theatre club. To set a play "The Big Bang Theory", they need to choose a group containing exactly t actors containing no less than 4 boys and no less than one girl. How many ways are there to choose a group? Of course, the variants that only differ in the composition of the troupe are considered different.

Perform all calculations in the 64-bit type: long long for C/C++, int64 for Delphi and long for Java.

Input Format(From the terminal/stdin)

The only line of the input data contains three integers n, m, t (4 \le n \le 30,1 \le m \le 30,5 \le t \le n+m).

Output Format(To the terminal/stdout)

Find the required number of ways.

Please do not use the %lld specificator to read or write 64-bit integers in C++. It is preferred to use cin, cout streams or the %I64d specificator.

Sample Input 1

Copy
5 2 5
 · · \n

Sample Output 1

Copy
10
  \n

Sample Input 2

Copy
4 3 5
 · · \n

Sample Output 2

Copy
3
 \n

Submit

请先 登录

© 2025 FAQs