Editorial for Mock CCC '18 Contest 1 J4/S2 - A Square Problem
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.
Author:
Because the input is nicely formatted, checking that the array is a Latin Square reduces to checking that every row and every column has distinct characters.
Checking for reduced forms just requires checking that the first row and first column are in sorted order.
A few contestants printed reduced without explicitly checking for the Latin square case first.
Comments