시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 1 | 1 | 1 | 100.000% |
Snuke came up with an integersing pair of strings (s, t), but forgot it. He remembers the following information:
Compute the number of possible pairs of strings (s, t), modulo 109 + 7. Assume that the size of the alphabet is A.
First line of the input consists of three integers N, M and A (1 ≤ N ≤ 200, 1 ≤ M ≤ 50, M ≤ N, 1 ≤ A ≤ 1000)
Print the number of pairs of strings (s, t) that satisfy the conditions above, modulo 109 + 7.
3 2 2
14
200 50 1000
678200960