My approach was to pretend I was the lawnmower and cut the grass in the array, then return it for comparison. My nick in the competition was wolfgang42, if anyone's interested.
I don't recommend the approach I took to problem C, by the way. It's a perfect example of how *not* to do it! On Apr 15, 2013 7:42 AM, "Sam Scott" <[email protected]> wrote: > There's another way to look at the lawn patterns question (Problem B). > Every square must be equal to the max of it's row or equal to the max of > its column (or both). Any violation of this (i.e. a square that is less > than the max of both row and column) makes the lawn pattern impossible. I > don't think this is any more efficient than the simulation recommended in > the official analysis, but I think it's a bit more elegant :-) > > Sam. > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-code/-/efeZpwA1QeMJ. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
