codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

131C.md (1104B)


      1 Source: https://codeforces.com/problemset/problem/131/C
      2 
      3 C. The World is a Theatre
      4 
      5 time limit per test
      6 
      7 2 seconds
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 stdin
     16 
     17 output
     18 
     19 stdout
     20 
     21 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.
     22 
     23 Perform all calculations in the 64-bit type: long long for С/С++, int64 for Delphi and long for Java.
     24 
     25 Input
     26 
     27 The only line of the input data contains three integers *n*, *m*, *t* (4 ≤ *n* ≤ 30, 1 ≤ *m* ≤ 30, 5 ≤ *t* ≤ *n* + *m*).
     28 
     29 Output
     30 
     31 Find the required number of ways.
     32 
     33 Please do not use the %lld specificator to read or write 64-bit integers in С++. It is preferred to use cin, cout streams or the %I64d specificator.
     34 
     35 Examples
     36 
     37 Input
     38 
     39 ```
     40 5 2 5
     41 ```
     42 
     43 Output
     44 
     45 ```
     46 10
     47 ```
     48 
     49 Input
     50 
     51 ```
     52 4 3 5
     53 ```
     54 
     55 Output
     56 
     57 ```
     58 3
     59 ```