|
|||
Kings AgainLast year's problem with kings was too easy, so I made it more difficult. Determine the number of ways in which k kings can be placed on an n × m chessboard without attacking each other. Two kings attack each other if they are on adjacent cells horizontally, vertically, or diagonally. Input SpecificationThe first line of the input contains t, the number of test cases to follow (1 ≤ t ≤ 15 000). Each test case is described by the values of n, m, and k, in this order, separated by spaces (1 ≤ n ≤ m ≤ 15, 1 ≤ k ≤ 100). Output SpecificationFor each test case, you must output a single line, the number of ways modulo 109 + 7. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |