Editorial for JDCC '16 Contest 1 P3 - Painting Cost
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:
Read the input and store in a 2D array. Then loop through each square of and count the number of unique squares. You can do this easily (but not necessarily efficiently) with a set.
Time Complexity:
Comments