Consider an N by N chessboard and a knight positioned on cell (a, b) (with
0 ≤ a, b <N). The following question arises, given a positive natural integer k (i.e. k> 0),
how many lengths of k and exclusively within the board boundaries the rider
Your challenge is to answer this question.
The entry for this exercise consists of a line containing the 4 integers N, k, a, and b, separated by
A line with the integer M that indicates how many lengths of k difference are possible
on the board starting from (a, b).
1 ≤ N ≤ 50 1 ≤ k ≤ 8
4 2 0 0