Editorial for COCI '10 Contest 6 #4 Abeceda
Submitting an official solution before solving the problem yourself is a bannable offence.
Consider every pair of consecutive words such that neither word is a prefix of the other. Let
Let's define the binary relation greater than on the given set of letters. We'll say that
If the transitive closure suggests that
Next, if there are two letters
Otherwise, the ordering does exist and it is unique. Let the number
Comments