As we know, Chinese Chess is an interesting riddle, maybe all of you are good at it,
and if you are a good programmer at the same time, you can write a program of playing
Chinese Chess, and then you can play the game with your computer.
Now, we concentrate on the "Horse".
As we known how the manner horses moves, a horse on the red point can go to the 8
green points in the figure I unless the green points is blocked or the point is out of
The horse is as the same as the knight in the western chess except a manner, which we
call it “绊马腿” in Chinese.
As the Figure I show, the first step to a direction is the ‘Ban’ point and the horse
is forbidden to get there.
Now you are given a chessboard with size of n * m, and there are several blocked
points on it. And you are given some candidate points to put a horse there.
And then you are asked that how many ways your horses can move to the aim point (x, y)
after exactly L steps.