On a standard checkerboard (
squares) the only black piece is
the king. The only
limitation to the number and kind of white pieces is the number of
squares left (63). This
means that apart from the black king there can be between zero and 63
white pieces on
the board.
Your objective is to determine wheter the black king is check mate or not.
Your input containing the description of the boards state is a
64-character string with
each character representing a square on the board (row after row).
The possible values for each character are:
- PAWN: one of the chessmen of least value having the power to move only forward ordinarily one square at a time, to capture only diagonally forward, and be promoted to any piece except a king upon reaching the eighth rank
- ROOK: either of two pieces of the same color in a set of chessmen having the power to move along the ranks or files across any number of unoccupied squares. Also called castle
- KNIGHT: either of two pieces of the same color in a set of chessmen having an L-shaped move of two squares in one row and one square in a perpendicular row over squares that may be occupied
- BISHOP: either of two pieces of each color in a set of chessmen having the power to move diagonally across any number of adjoining unoccupied squares
- QUEEN: the most privileged piece of each color in a set of chessmen having the power to move in any direction across any number of unoccupied squares
- KING: the principal piece of each color in a set of chessmen having the power to move ordinarily one square in any direction and to capture opposing men but being obliged never to enter or remain in check
Suppose the checkerboard starts at the upper left corner with the field a/1. Therefore
white is playing upwards (Starting at g-h/1-8).
The output consists of only a word YES or NO.
Kbbbbbbbtlttttttbbbbbbbbssssssssbbbbbbbbllllllllbbbbbbbbtsldklst
NO