Chess on Planet X |
Chess on Planet X is very different from chess on Earth. It has a piece called the Super Queen, which can move and attack as a knight, a rook, and a bishop at the same time. Howevever its powerful attack can be blocked with a Pawn, just like chess on Earth. Given an n-k x n-k chessboard, count the number of ways of placing n Super Queens and k pawns on it, such that none of the Super Queens are attacking each other.
There is a number of inputs. Each input is n (n<19) and k (k<6) on a single line.
For each input, output the number of ways on a single line.
13 1 18 4
72 16
Problem setter: Josh Bao