Editorial for COCI '06 Contest 6 #2 Magija


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 cell (i, j) in the given quarter is copied to three other cells. The coordinates of those cells are (depending on the implementation):

  • If the upper left cell is (0, 0), the coordinates are (2R-i-1, j), (i, 2C-j-1) and (2R-i-1, 2C-j-1).
  • If the upper left cell is (1, 1), the coordinates are (2R-i+1, j), (i, 2C-j+1) and (2R-i+1, 2C-j+1).

After copying the cells we add the error, changing the specified cell.


Comments

There are no comments at the moment.