Knicht and pawn against a Knicht
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Horse and pawn against a horse to you the certain correct postponed chess party in which there was a termination a horse and a pawn against a horse is set. As always, in the postponed position a course white.
Your problem is very simple - to define quantity of possible courses of a white horse. Possible courses by rules are shown in figure by red points.
Input
In the first line the arrangement of white figures, and in the second - black is set through a blank. Designations of figures are given below in the note.
Output
To deduce a singular - required quantity of admissible courses of a white horse.
Examples
Input #1
Answer #1
Submissions 555
Acceptance rate 21%