PivotOJ

Bojanje

시간 제한: 1000ms메모리 제한: 1024MB출처: COCI 2022-2023BOJ 27549

문제

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 he got a lot of critiques his painting is too predictable, he decided to modify his painting in tt iterations. In every iteration he will do the following steps:

  1. Oliver will select uniformly at random an index ii (1 ≤ i ≤ n), and memorize the colour on the ii-th part od the painting.
  2. Again, Oliver will select uniformly at random an index jj (1 ≤ j ≤ n). He will repaint the jj-th part of the painting with the colour of the ii-th part od the painting. If the jj-th part is already painted in that colour, there is no change. Note that ii can be equal to jj.

Now, Oliver is afraid his painting will become monotonous or boring. He considers a painting good if there are at least kk differents colours on it. Help him calculate the probability that his painting will be good at the end.

입력

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

출력

In the first and only line output 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 p &middot; q^{-1} \bmod m. In other words, output such an integer xx that 0 &le; x < m and x &middot; q \equiv p \pmod m.

힌트

Clarification of the first example: On the painting there are two colours, so the probability that it remains the same after one iteration is 12\frac{1}{2}.

Clarification of the second example: After two iterations, the number of different colours can’t go from 1010 to less than 55, so in every case the painting will have at least 55 different colours.

예제

예제 1

입력
2 1 2
출력
500000004

예제 2

입력
10 2 5
출력
1

예제 3

입력
3 141592653589793 2
출력
468261332
코드를 제출하려면 로그인하세요.