Tasks:
 
Task DescriptionDiscussion (0)
Task :: Chess
Mr. Fuad loves chess so much. He only knows king's move. Now he has K kings and a "special" chess board with size N X M. He wants to know the number of ways to put K kings so that none of them attack each other.


INPUT:
The first line of the standard input contains the number N, M and K, 1<=N<=50, 1<=M<=10, 1<=K<=8,where N = length of the board and M = width of the board and K corresponds to the number of kings to be put on the chess board.


OUTPUT:
To the standard output write one number that is the number of ways to put K kings on the chess-board so that none of them attack each other. As this number can be very big print it with modulo 1000007.



Input 1:
2 1 1

Output 1:
2


Input 2:
50 10 1

Output 2:
500


Input 3:
3 3 3

Output 3:
8

Submit Solution
:
:
Available Languages
Task info
Name:Chess
Time:0.05 sec.
Memory:4 MB
#Tests:10
AddedBy: harta01
Task Ratings
Difficulty:

4.5 (11 votes)
Quality:

4.4 (10 votes)
Acceptance Rate
Recent Submissions
Fastest Solutions
UserTime
oduleodule 0.003 s.
RobertGerbicz 0.004 s.
The_Philosopher 0.005 s.
fetofs 0.008 s.
gates 0.018 s.
halil 0.02 s.
flashmt 0.022 s.
mateuscd11 0.022 s.
ZionTrain 0.022 s.
zjsxzy 0.023 s.
Solved By