Under construction

Still being built. Things may change

Painting

Time limit1sMemory limit1024 MB

Summary
Given n parts with distinct colours and t random repaint steps, find the probability that at least k colours remain, modulo 1000000007.
Level

Medium6 of 10

Topics
Probability, Matrix, Math
Solved
No attempts yet

Problem

Oliver is a rubber duck that not only finds bugs but also likes to paint. His latest painting has nn parts, each coloured with a unique colour. After receiving many critiques that his painting is too predictable, he decided to modify it in tt iterations. In every iteration he does the following steps:

  1. Oliver selects an index ii (1≤i≤n1 \le i \le n) uniformly at random and memorizes the colour of the ii-th part.
  2. Oliver then selects an index jj (1≤j≤n1 \le j \le n) uniformly at random and repaints the jj-th part with the colour of the ii-th part. If the jj-th part already has that colour, nothing changes. Note that ii can be equal to jj.

Oliver is afraid his painting will become monotonous or boring. He considers a painting good if it has at least kk different colours. Calculate the probability that his painting is good at the end.

Input

The first line contains the numbers from the task statement nn, tt and kk (2≤k≤n≤102 \le k \le n \le 10, 1≤t≤10181 \le t \le 10^{18}).

Output

Print the answer modulo 109+710^9 + 7.

Formally, let m=109+7m = 10^9 + 7. It can be shown that the answer can be expressed as an irreducible fraction pq\frac{p}{q}, where pp and qq are integers and q≢0(modm)q \not\equiv 0 \pmod m. Output the integer equal to pq−1 mod mp q^{-1} \bmod m. In other words, output the integer xx with 0≤x<m0 \le x < m such that xq≡p(modm)x q \equiv p \pmod m.

Hint

Clarification of the first example: The painting has two colours, so the probability that it stays the same after one iteration is 12\frac{1}{2}.

Clarification of the second example: After two iterations, the number of different colours cannot drop from 10 to less than 5, so in every case the painting has at least 5 different colours.

Examples3

  1. Example 1

    Input
    2 1 2
    
    Expected output
    500000004
    
  2. Example 2

    Input
    10 2 5
    
    Expected output
    1
    
  3. Example 3

    Input
    3 141592653589793 2
    
    Expected output
    468261332