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.
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 , 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 will be #
depending on the parity of . As for typing in Mirko's crossword puzzle, the field of Mirko's crossword puzzle from the input will be typed into the field of our chessboard.
Comments