You are given an chess board, with some black bishops on it. Please place as many white bishops as possible is such a way that no white bishop threatens another bishop, either black or white.
For instance, for the board to the left a possible solution is shown on the board to the right.
Input consists of several cases, each with
followed by
lines, each one with
characters: ‘B’ for black bishops, and ‘.’ for
empty cells. Assume
.
For every case, print any possible solution using ‘W’
for white bishops, followed by a line with 20 dashes. Follow exactly the
format of the sample output.
Author: Felix Miravé
Generation: 2026-01-25T12:03:06.505Z
© Jutge.org, 2006–2026.
https://jutge.org