Editorial for COCI '13 Contest 3 #2 Okvir


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

The easiest way is to first fill out the whole chessboard with characters # and ., the dimensions being (U+M+D) \times (L+N+R), and then typing in Mirko's crossword puzzle. For both operations, we need a double for loop iterating through the matrix (or submatrix).

As for filling out the chessboard, the field (i, j) will be # depending on the parity of i+j. As for typing in Mirko's crossword puzzle, the field (i, j) of Mirko's crossword puzzle from the input will be typed into the (U+i, L+j) field of our chessboard.


Comments

There are no comments at the moment.